I created a forms application and placed a tab control on it. In the same project I added a UserControl with all the controls one tab would need. I then placed this UserControl on the second tab of the tab control.
Now, when I open the designer to modify the forms application it loads OK (although it takes longer than usual) but when I select the second tab MSVS just freezes, says it’s encountered an error, and restarts (most times). Once I was given the option to “debug”.
I clicked the “debug” button which opened a new MVS 2005 window and displayed: “Unhandled exception at 0x10d84c12 in devenv.exe: 0xC0000005: Access violation reading location 0x00000000.”
No idea what is going on… 🙁 Tried restart but didn’t work.
Any help would be greatly appreciated!
This would probably happen if your control ends up executing unmanaged code.
Make sure that the control’s source code doesn’t do anything if
DesignModeis true.It might also happen if you use ActiveX controls; try removing them in code if the control is in design mode.
You can do that in the
Loadhandler: