Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6357005
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:04:53+00:00 2026-05-24T23:04:53+00:00

Following is my problem: I have a custom UserControl in my Windows Forms Project.

  • 0

Following is my problem:
I have a custom UserControl in my Windows Forms Project. I can design it in the designer just fine. But as soon as i want to edit the form which contains the control Visual Studio 2010 crashes.

As far as i could see the Constructor and the Load-Event of the control are executed on loading the form.

I tried using another instance of VS2010 to debug the designer, but could not find the location where the execption occurs.

At first my problem seemed to be, that for the Threading.Timer object, which i use for the initialisation of my Objects (i.e. Loading values from a Database and so on (on error try again later approach ;))), the Callback-Function was executed by the designer an therefore it attempted to access objects to which it had no access while in the design mode.
The initialisation of the Threading.Timer Object is in the Load-Event. But even after i commented everything in the load event out (except a try catch block an a Debugger.Break() Call for having a breakpoint in the second instance VS2010 to debug the designer) Visual Studio keeps crashing as soon as I want to edit the form containing the control in design mode.

I tried some steps I found here without an answer to my problem: User control always crashes Visual Studio

So even if the designer has nothing to do when parsing the Load-Event or the Constructor. It still crashes.

Has someone an idea what I could do to prevent Visual Studio from crashing and displaying the user control properly in the forms designer?

The project containing the usercontrol also references some custom libraries and a library project. I don’t know if the problem could have something to do with that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:04:54+00:00Added an answer on May 24, 2026 at 11:04 pm

    Solved somehow my own problem…

    Somehow by trying to debug the designer mode i tricked myself.

    Setting a Debugger.Break() in the Load-Event was a very bad idea while trying to open the form containing the user control in the designer mode, because if you are not debugging Visual Studio with another instance of Visual Studio then Debugger.Break() will stop the Application and therefore crashes the Visual Studio Instance.

    In the end by Using the DesignerMode Property of the User Control I was able to prevent the designer from executing the initialisation of my threading.Timer Objects could solve the problem this way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have following problem: I've got an UITableView with 7 custom cells. Each of
i got the following problem. i have a ListView with custom rows consisting of
I have the following Problem: I create a custom control which inherits from an
I have the following problem / bug: I made a custom button-class (called CustomBlitButton)
I have the following problem: I have an HTML textbox ( <input type=text> )
Has anyone encountered the following problem: I have IIS7 running on my computer. On
Avast there fellow programmers! I have the following problem: I have two rectangles overlapping
When writing GUIs, I've frequently come over the following problem: Assume you have a
I have the following problem using subversion: I'm currently working on the trunk of
I have the following problem using template instantiation [*]. file foo.h class Foo {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.