Link to home
Start Free TrialLog in
Avatar of BobBarker_99
BobBarker_99

asked on

Visual Studio crashing when I click on custom control

Hello,

I have a custom control.  When I try and build my project, or click on the custom control (placed in another form) visual studio crashes saying:

Microsoft Visual Studio has encountered a problem and needs to close.

It was working at some point, so obviously I have done something to piss visual studio off... how can I figure out what I did, and what I need to do to fix it?
Avatar of BobBarker_99
BobBarker_99

ASKER

Well I seem to have figured it out by a process of eliminating... just commenting parts out, and uncommenting them.  Everything is  uncommented now, and it still works.  I only made 1 change, checking for a null value in a property.  

Does vs call that property or something?  Because in my code I never call it before it is initialized... is that somethin that vs does? in design mode?
Well, it depends on the location of the code...

If you put a code inside the form load or the sub new. And an error was encountered visual studio cannot load that control, or let you drag it in your form.
Its not in form load or new..

Its just in a "set" property.  So either it was the change i made there that made the difference, or just some glitch in vs, that commenting out, and uncommenting the code fixed..?  

Sometimes vs drives me crazy!
Can you  post the code?
ASKER CERTIFIED SOLUTION
Avatar of JackOfPH
JackOfPH
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial