473,795 Members | 2,834 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Vanishing Controls when changing from Debug to Release

I have a project with a variety of forms in it. The controls on those
forms are from another project in the same solution.

When I change from Debug to Release, I can do a build just fine (and
the built project runs just fine too), but if I open one of the forms
up in the IDE to edit it visually, it complains that it can't find the
controls.

Going into the code, and checking with "Go To Definition" confirms that
it _can_ find the definition, and as I said, it compiles just fine.
It's just the visual editing that goes strangely askew.

Anyone encountered this one before?

Andy D

Nov 17 '05 #1
4 1522
We've experienced the same problems with Visual Studio 2003 because we could
not reproduce it and since it only happened once in a while we never figured
out what the problem was. Altough we believed that it had to do with the
combination of SourceSafe and checking out/in resource files.

Gabriel Lozano-Morán
Nov 17 '05 #2
It could well be to do with version control - we're using CVS here, and
it wouldn't surprise me if there was an odd glitch going on.

Thank goodness for version control though - if the controls go missing
I can just uncheckout the form and revert to the version on the server.

Nov 17 '05 #3
Andrew,

This problem has been seen by a lot of folks including myself. Here are
some notes that I keep on the subject:

There is supposedly a fix from Microsoft (see Article 842706):
FIX: Controls disappear from the Windows Forms Designer in Visual Studio
..NET 2003
http://support.microsoft.com/default...B;EN-US;842706

Other Notes:
- Make sure the form's tab is not visible and move the forms constructor to
the very top of the form class. Yes, above the field declarations as well.
Afterwards, recompile the solution and view the form.

- If the control has never been compiled for either debug or release, make
sure that the from tab is not visible when you switch your build option from
debug to release or vice versa if the control has never been built for the
target build type. At any rate, rebuild the solution for the new target
build option and then you can open your form.

- It also seems like some folks don't take into consideration what custom
controls are doing at design time in the IDE and should consider using the
this.DesignMode property inside of constructors and paint methods to avoid
creating stuff and using objects that aren't really used at design time.

- To avoid having to retrieve code from source control to restore, consider
turning off the auto-save before building options (Tools->Options->Build and
Run options). Yes, you may have to manually save sometimes to see your
changes before building and running. Sometimes you don't...haven't figured
that one out.....

- Finally, the one that I have seen work a few times.... Open a form with
problems, move a few things around, close the form and DO NOT save, reopen
the form and the controls are back in place. Don't ask me why....Microsof t
has some bugs that I hope they have fixed in 2.0.
Have fun,
Dave
Nov 17 '05 #4
DS
Andrew Ducker wrote:
I have a project with a variety of forms in it. The controls on those
forms are from another project in the same solution.

When I change from Debug to Release, I can do a build just fine (and
the built project runs just fine too), but if I open one of the forms
up in the IDE to edit it visually, it complains that it can't find the
controls.

Going into the code, and checking with "Go To Definition" confirms that
it _can_ find the definition, and as I said, it compiles just fine.
It's just the visual editing that goes strangely askew.

Anyone encountered this one before?

Andy D


Andy,
I presume that you're using VS2002 or VS2003. I had a horrific time with
the designer eating my forms as well. Its voracious appetite seemed to
stem from my use of visual inheritance and custom controls. I've lost
many hours of work to this annoying bug and finally found a workaround--
its a little more time consuming, but sure beats redesigning a whole
form. Check out these URL's for the details:

http://www.shawnburke.com/default.as...serinterface=9
http://spaces.msn.com/members/mwadams/Blog/cns!1pAMOzaH98Z fHK1uhQS5Bd5g!1 11.entry

The good news: I've started using VS2005 Beta 2 and the form designers
appetite seems to have been satiated for the time being :)

Good luck.
-DS
Nov 24 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3801
by: DBQueen | last post by:
I have a form with lines of controls. On some of the lines there are 3 controls (call them A,B,C); other lines have only control A. The controls have been numbered sequentially (Q20, Q21....Q76) and they were put onto the form in the numerical sequence. I have given the A's with B & C's on the same line a tag=1; B.tag=2, C,tag=2) I am trying to write 2 modules so that the following occurs (on Form_Current and 'A' Control_Before or...
1
2912
by: Darren | last post by:
When I do a final build I typically build all projects in debug mode first and then release mode and then copy all files to a builds folder. However I've noticed that the .pdb files in the debug folder aren't always there. After investigating I found out that when I change from debug to release version, it deletes the .pdb files in the debug folder. Why would it do this? What else is it doing to my files? Thanks, Darren.
2
1319
by: Greg | last post by:
There is a repeating issue of controls vanishing from a form in the Dev environment which is starting to get annoying. What happens is that I will have a form open in the IDE. The form will have a variety of buttons on it. The form will be saved, then compiled and run. After it runs, one or more buttons have either vanished completely, or moved to a position of 0,0. If the control vanishes completely, it may still show up when...
3
1919
by: HairlipDog58 | last post by:
I have a VC++6 project where I need to delay load a DLL. I used a structured exception handling frame and all seems to work when I build the debug version and run it (either in or out of the debugger). In debug build, the exception is caught and reported gracefully to the user. When I build the release version and run it, the SEH frame does not catch the exception and the application crashes. Has anyone had a similar experience and if...
2
1696
by: nulldevice | last post by:
I've got a datagrid with some nested controls, created at design-time. The controls themselves have no databound values. After a few other operations on the page (selecting a few parameters, etc), a button is clicked and the databind occurs. This part works fine. It retreives the 4-10 rows it needs and using the itemdatabound formats everything nicely. What I intend to do then, is after the user has gone through the nested controls...
2
1293
by: Linda | last post by:
Greetings, I am experiencing a problem similar to that mentioned in <a href="http://groups-beta.google.com/group/microsoft.public.dotnet.languages.vb/browse_thread/thread/a4ca8746b3de09c2/3a24082f15010830?q=controls+vanishing&rnum=1#3a24082f15010830">this post</a>, which is too old for me to respond to. Does anyone have any additional information? I am using VB.Net 2003. The Solution has two projects: one is a library project, which...
5
4018
by: Joachim | last post by:
I needed to change the name of the project folders, e g. |-MyProject | |-MyProject to something else. Now it doesn't matter what I do - even if I rename the folders to the original name the project fails to load. The error message is "One or more projects in the solution could not be loaded for the following
2
2709
by: Dave Johansen | last post by:
I just converted a solution from Visual Studio 2003 to Visual Studio 2005 and the Debug mode seems to be running just fine, but the Release mode crashes on the following code: std::ifstream in("myfile.txt"); float value; in >value; //The crash happens here in the getloc() function The above code is actually from a library built in Debug mode that is linked into the Release build of the executable. Does anyone have any
36
2500
by: TC | last post by:
I've used Access for many years. Several times, I've encountered a bug which I refer to as the "Vanishing Joins" bug. When it happens, joins vanish randomly from queries. More specifically, all joins vanish from at least one (seemingly random) query. I've always regarded the Vanishing Joins bug as a symptom of corruption. When it happens, I usually give my users advice on how to recover from corruption, and how to avoid it in the future....
1
10165
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10002
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7543
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5565
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2921
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.