Diappearing User Controls

G

Guest

Again, I got caught by the bug in VB.Net 2003 where a usercontrol placed on
the form at design time works fine for a week or so then all of a sudden,
it's not there. Has this bug been fixed in VB.Net 2005?

I have resorted to adding any UserControls at runtime but this isn't very
efficient programming and and I use a lot of UserControls inheirited from
Microsoft's base controls.
 
B

Bob Powell [MVP]

I have *never* had this happen to me. However I've never been silly enough
to modify the nitializeComponent method by hand. Have you?

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
G

Guest

I haven't modified the initialization code. This is a known bug by Microsoft
and they have a hotfix for it but you have to call in to them to get it and
possibly incur charges for their help.
 
B

Bob Powell [MVP]

Having read the MS kb article... (I may be an MVP but that doesn't mean I'm
an MS employee etc...) I see that this fault often occurs when the solution
containing the user control also contains the code which utilises the
control.

I have never been caught out by this one because I've never developed a
control that I tested in this manner.

Windows Forms Tips and Tricks has an article explaining how to correctly set
up test debugging for custom controls. I hope this will asssist you.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
G

Guest

It also occurs when a user control is placed on a form and the user control's
code does not contain code that uses the control. It has happened to me
twice and seems to happen when the user control is quite large. I have a
multigrid that I wrote from scratch which has a lot of code since all the
graphics are done by the code as well. The form that uses this grid control
seems to just stop displaying it.

All the code for the control is still in the Designer code for the form but
it doesn't get displayed either at design time or run time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top