Solved

Custom control keeps disappearing in Visual Basic 2008

Posted on 2010-09-02
3
287 Views
Last Modified: 2013-11-27
Hello,
I have a custom control that I use for a date-picker on several VB.NET windows forms. The control has a button on it, that pops the calendar up when the user clicks it. (I'm using framework 3.5, VS2008)

Daily, I go into Visual Studio 2008 to modify and test the forms and every day, at least one form is missing the "buttons" on the custom control. (It looks like a textbox without the button, though the properties clearly says it's my customized control.)

Sometimes the control comes back correctly if I add a new one (customized) for the form, or press F4/properties... or go out of the project and back in. There seems to be no consistency in getting the control to show back up on the forms. (Sometimes it'll work on one form but not another...)

I would appreciate any help on this. I'm dealing with this every day... sometimes the same forms, sometimes different ones. The inconsistency makes it hard to find a fix.

Help! (and Thanks!)
Mary Z
0
Comment
Question by:mz64
  • 2
3 Comments
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 33595753
Have a look at this link and see if it helps:
             http://www.vbforums.com/showthread.php?p=3567669
0
 

Accepted Solution

by:
mz64 earned 0 total points
ID: 33741380
I don't know that my question is completely answered. But I have some work-arounds for this. I don't believe it is a coding problem.

Just today I had the issue come up. In the VS 2008 the control appeared to be gone, but when I ran the project, it found the custom control, which then showed up on the forms: no more errors or disappearing controls.

I'm closing this as I seem to be able to work with it now. Thanks!
0
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 33769114
For the record, I believe the cause of the problem is still the NullReferenceException error that I alluded to in my original post.  This error appears whenever there is an unhandled exception, and it can manifest itself several different ways.  Here are some more references:
http://social.msdn.microsoft.com/Forums/en-US/csharpide/thread/c023cd11-def4-4fde-a95a-7d8d496ce904

http://www.eggheadcafe.com/community/aspnet/7/10149170/error-message-nullreferenceexception.aspx

http://stackoverflow.com/questions/1489094/cssfriendly-nullreferenceexception
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now