Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows Form Controls Disappeared
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00867661
Message ID:
00868328
Views:
10
Slava,

I don't know ... I haven't had things totally disappear. Once a control has been added, it remains ... I just can't bring up the form in the IDE, it errors out if I try ... but once the controls library has compiled cleanly, then the form will come up just fine in the IDE ... everything is still there. Which version of VS are you using? I have VS 2003.

~~Bonnie

>Thank you Bonnie for your response,
>I understand that controls cannot be drawn if their source is broken. The problem is that if the Controls.Add code is gone it does not appear itself even if the library compiles fine. There is only declaration of the controls remain which is not enough to bring them back. It makes sense, but does not make our life easier. If I have added controls once and have not removed them, I don't want to add them again. It would have more sense if just graphic presentation changes (white square with red cross for example), but the code remains.
>
>Thanks again
>
>Slava
>
>
>>Slava,
>>
>>I've run into this from time to time. As you've seen, as soon as you fix the error and can get a clean compile of your control library, then when you bring your form back up everything that you thought had disappeared comes back just fine. It makes sense if you think about it ... the IDE has gotten confused because it doesn't have a clean version of your control library anymore ... not until you can compile it cleanly again.
>>
>>~~Bonnie
>>
>>>I have investigated the problem further.
>>>If I have an error in my library of controls and rebuild the solution as many times as I want, I get many errors, but the code does not vanish. I am watching the MyForm.cs file. After fixing the error in the library, everything is fine like nothing happened. If I go to the form’s design page before the fixing the error, all my library’s controls are disappearing from the form at that exact moment!
>>>Despite having the reference in my main project to the library project (not DLL), I have to use library’s DLL for my toolbox. I think that is why I am having the problem. I tried to use library’s DLL from both bin folders and found no differences.
>>>I know that many people use their own controls and I presume own toolboxes. Can anybody reproduce the situation? Am I the only person having this problem?
>>>
>>>Thanks
>>>
>>>Slava
>>>
>>>>I am having this problem second time and it drives me crazy. I have a library with my controls as a project in my solution. I added a new control which gave me an error if I built this library project. Instead of Build I accidentally chose Rebuild option. This option rebuilt my whole solution. It looks like the error in the library project did not let the main project recognize the library. All the library’s controls disappeared from the forms in the main project. Fixing the error in the library project does not bring them back. I have to manually drop the controls from my toolbox. Even worse, declarations of the controls remain in the code and I cannot name the controls without deleting the old code.
>>>>I had this problem before when I tried to add a new control from the library to my toolbox. I suspect that the version synchronization has been broken, but don’t know how to avoid that. My main project has a reference to the library project. Why the This.Control.Add() commands vanished instead of just giving errors? Is there more intelligent way to avoid such disaster?
>>>>
>>>>Thanks in advance
>>>>
>>>>Slava
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform