all groups > dotnet windows forms designtime > july 2004 >
You're in the

dotnet windows forms designtime

group:

My controls keep dissapearing!



My controls keep dissapearing! Simon
7/27/2004 4:49:15 PM
dotnet windows forms designtime: I have a c# solution containing the following projects -

a windows form control library containing some custom windows form controls
a windows form app with forms containing these controls (with a local
solution reference to the controls proj)

Randomly(?) the designer will just wipe these controls off the form (it will
even try and check the form out to do the damage! - if it already is then
its usually goodbye to a few hours work :o/ ). Sometimes building the
controls project again will magically bring them back but more often than
not its a lengthy solution restart... What causes this behaviour and how can
it be prevented?

Frustrated,

Simon

Re: My controls keep dissapearing! Jim-M
8/9/2004 2:27:31 PM
Sorry I can't be more specific, but I saw this problem when developing
WinControls. Periodically if one of my custom controls threw an
exception in a constructor, the control would disappear (except for the
declaration in the generated components section).

My suggestion would be to take a look at your controls and put some
debugging messages in the constructors and at other key places. I
ultimately tracked it down to a property that wasn't being initialized
correctly within a control constructor.

Happy hunting!


[quoted text, click to view]

AddThis Social Bookmark Button