By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,152 Members | 2,039 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,152 IT Pros & Developers. It's quick & easy.

Disappearing controls

P: n/a
Hi All,

I've seen many postings regarding different situations where controls
disappear but have never seen a decent solution.

Here is the problem. I have a form onto which I am placing some
standard controls from the toolbox (mainly radio buttons and labels.)

The form itself derives from a base Form which derives from
System.Windows.Forms.UserControl. I do this as the base form has a
standard header which I wish to use on all derived forms.

Quite often when I rebuild the code a control vanishes from the design
view. It is still available via the properties combo (or if you look
at the Component Designer generated code, but usually the size has
been set to (0,0) or some other property is randomly deleted (such as
the text in the case of the label control)

Microsoft describe a very similar problem on their web-site and
provide a patch but the patch is for .NET 2002 and I am using .NET
2003 and so the patch won't install.
(http://msdn.microsoft.com/vstudio/do...talossifx.aspx)

Hopefully I have described all relevant information here.

Does anyone know how to stop this from happening?

Cheers,
Steve
Nov 16 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Steve,

Yes, I have experiencedd the same problem with both 2002 and 2003. It is
sporadic and I can never figure out what causes it. However, the work
around I use is to close the Designer View and recompile. Then open the
form after it has compiled in the designer and the controls somehow
magically re-appear.

A similar issue I have is sometime the Tab pages of the TabConrol shift out
of order. If I have 6 Tabs, and add a 7th, the index order gets mangled.

Sorry, I don't have a better fix.

Fritz
"Steve" <go****@sforeman.com> wrote in message
news:43**************************@posting.google.c om...
Hi All,

I've seen many postings regarding different situations where controls
disappear but have never seen a decent solution.

Here is the problem. I have a form onto which I am placing some
standard controls from the toolbox (mainly radio buttons and labels.)

The form itself derives from a base Form which derives from
System.Windows.Forms.UserControl. I do this as the base form has a
standard header which I wish to use on all derived forms.

Quite often when I rebuild the code a control vanishes from the design
view. It is still available via the properties combo (or if you look
at the Component Designer generated code, but usually the size has
been set to (0,0) or some other property is randomly deleted (such as
the text in the case of the label control)

Microsoft describe a very similar problem on their web-site and
provide a patch but the patch is for .NET 2002 and I am using .NET
2003 and so the patch won't install.
(http://msdn.microsoft.com/vstudio/do...talossifx.aspx)

Hopefully I have described all relevant information here.

Does anyone know how to stop this from happening?

Cheers,
Steve

Nov 16 '05 #2

P: n/a

"Fritz Switzer" wrote:

[Re: Disappearing controls in Visual Studio]
Yes, I have experiencedd the same problem with both 2002
and 2003. It is sporadic and I can never figure out what
causes it. However, the work around I use is to close the
Designer View and recompile. Then open the form after it
has compiled in the designer and the controls somehow
magically re-appear.
My experience has been that this occurs often when you have created
a user control (or custom control), placed it on a form, and then
make a change to the user control itself. Let's say you realize that
your user control needs an extra button, or whatever. You make the
change, compile, and suddenly the control disappears from your form.

Doesn't happen every time but quite often. My impression is that the
environment is having a hard time loading (or whatever term is
appropriate) the user control after it has changed. But I don't
know. My work around is the same as yours.
A similar issue I have is sometime the Tab pages of the
TabConrol shift out of order. If I have 6 Tabs, and add a
7th, the index order gets mangled.


Oh yeah, I've had this happen, too.
Nov 16 '05 #3

P: n/a
Wave,

Yes there is usually a custom control on the WinForm.

I just wish it would do it everytime or not at all:)

Fritz
"Wavemaker" <ja**********@BiteMeHotmail.com> wrote in message
news:Ib********************@comcast.com...

"Fritz Switzer" wrote:

[Re: Disappearing controls in Visual Studio]
Yes, I have experiencedd the same problem with both 2002
and 2003. It is sporadic and I can never figure out what
causes it. However, the work around I use is to close the
Designer View and recompile. Then open the form after it
has compiled in the designer and the controls somehow
magically re-appear.


My experience has been that this occurs often when you have created
a user control (or custom control), placed it on a form, and then
make a change to the user control itself. Let's say you realize that
your user control needs an extra button, or whatever. You make the
change, compile, and suddenly the control disappears from your form.

Doesn't happen every time but quite often. My impression is that the
environment is having a hard time loading (or whatever term is
appropriate) the user control after it has changed. But I don't
know. My work around is the same as yours.
A similar issue I have is sometime the Tab pages of the
TabConrol shift out of order. If I have 6 Tabs, and add a
7th, the index order gets mangled.


Oh yeah, I've had this happen, too.

Nov 16 '05 #4

P: n/a
Thanks for the help guys. At least now I have a way of getting the
controls back which will help a lot. Having to recreate a control
that had already dissapeared twice was starting to get way tedious!

In my case the controls that are disappearing are not custom controls
but they are on a custom form, so I guess the IDE has issues with you
customising things.

From what I gather this problem has been around for a while, have
Microsoft stopped supporting this product aleady!!!
Yes, I have experiencedd the same problem with both 2002
and 2003. It is sporadic and I can never figure out what
causes it. However, the work around I use is to close the
Designer View and recompile. Then open the form after it
has compiled in the designer and the controls somehow
magically re-appear.

Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.