MacKenzie,
I've experienced the same issue, though for me it was always with a typed
dataset that I dropped onto a form. After much frustration, I finally
figured out what was going on yesterday. Hopefully this will help you as
well.
In my solution, I had two projects - call them DataAccess and UI. The
DataAccess project defines the datasets used in the application, and the UI
project contains the UI of the app. The UI project references the
DataAccess project. If I made a modification to the DataAccess project that
caused the DataAccess project not to compile, the DataAccess.dll file would
get deleted during the build. Then, the form (in the UI project) that
referenced a dataset from the DataAccess project could not find the
DataAccess.dll, and would remove the dataset from the form.
If you have components/controls that are defined in a DLL that for this same
reason or another reason can't be loaded/located by Visual Studio, it will
most likely delete those controls from your form as well.
I hope this helps.
-Eric Harmon
> Hello Every
>
[quoted text clipped - 4 lines]
> Thanks
> MacKenzie
Robert Gruen [MSFT] - 15 Apr 2004 20:19 GMT
Controls tend to disappear if there was an error loading the control when
the designer parses the designer generated code. If you look closely at
the designer generated code you'll notice that all of the code for your
controls are still there but they dont' show up. What actually happens is
the ME.Controls.Add statment for the missing controls is removed because
the controls failed to load for some reason. To put your controls back on
your form all you have to do as add the Me.Controls.Add statement back to
the windows form designer generated code.
Thanks! Robert Gruen
Microsoft, VB.NET
This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
#From: "Eric Harmon" <etharmon@bellsouth.net>
#References: <OOu$cElHEHA.2928@TK2MSFTNGP10.phx.gbl>
#Subject: Re: Disappearing Controls
#Date: Sat, 10 Apr 2004 10:05:20 -0400
#Lines: 41
#X-Priority: 3
#X-MSMail-Priority: Normal
#X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
#X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
#Message-ID: <enoBeTwHEHA.3444@TK2MSFTNGP11.phx.gbl>
#Newsgroups: microsoft.public.vsnet.ide
#NNTP-Posting-Host: adsl-068-209-099-248.sip.mia.bellsouth.net 68.209.99.248
#Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
#Xref: cpmsftngxa06.phx.gbl microsoft.public.vsnet.ide:11749
#X-Tomcat-NG: microsoft.public.vsnet.ide
#
#MacKenzie,
#
#I've experienced the same issue, though for me it was always with a typed
#dataset that I dropped onto a form. After much frustration, I finally
#figured out what was going on yesterday. Hopefully this will help you as
#well.
#
#In my solution, I had two projects - call them DataAccess and UI. The
#DataAccess project defines the datasets used in the application, and the UI
#project contains the UI of the app. The UI project references the
#DataAccess project. If I made a modification to the DataAccess project
that
#caused the DataAccess project not to compile, the DataAccess.dll file would
#get deleted during the build. Then, the form (in the UI project) that
#referenced a dataset from the DataAccess project could not find the
#DataAccess.dll, and would remove the dataset from the form.
#
#If you have components/controls that are defined in a DLL that for this
same
#reason or another reason can't be loaded/located by Visual Studio, it will
#most likely delete those controls from your form as well.
#
#I hope this helps.
#
#-Eric Harmon
#
#
#"MacKenzie Mickelsen" <mackenziemi@skymailint.com> wrote in message
#news:OOu$cElHEHA.2928@TK2MSFTNGP10.phx.gbl...
#> Hello Every
#>
#> For about 3 months now that I have noticed, when I open the forms
#designer
#> occasionally it will delete, what I can only assume are, random controls
#> from my form. Does anyone what might be causing this??? and how to fix
#it???
#>
#> Thanks
#> MacKenzie
#>
#>
#
#
#
Karim M. Garza - 11 May 2004 03:46 GMT
Eric,
thanks alot for your comments, this has been happening to me and my co-worker, but since we are always to busy trying to get things out, we never tried to find out why the controls were dissapearing. Thanks for your explanation, but I guess the only solution is not to go to the project that references the project that did no compiled until we have a working version
Thanks
Karim M. Garz