Mysterious error with System.Windows.Forms

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I reloaded a WinForms project in VStudio 2003 that has been working perfectly
fine for months. Suddenly I'm getting strange reference errors AND I can no
longer load any form in Designer view.

Yet when I start a new project, everything appears to be working fine.

What might have gone wrong and how do I resolve it?
 
Your information on the problem is not complete but as guessing goes did you
move any controls that are used on the form or uninstalled something that
might have corrupted something.
 
Robert,
Are you using some custom project/3rd party Library in your
code. I think you are using function in the constructor of the form
which now u are un able to view in the designer, and that function is
not working properly now(May be a database connection).

Regards,
Naveed Ahmad Bajwa
http://bajoo.blogspot.com/
 
Another wild guess....

1. If you use devenv.exe to compile a silution form the command prompt it
somehow screwup the design time of all forms and controls. I don't know
what's wrong with it, but try to do some modification in the source code
(simple adding of a space somewhere just to make the fild *dirty* and save
it in order to refresh the file on the disk. The close all windows related
to the form or control (code view and designer view) and open them again. It
might help.

2. Make sure that the class declaration of form or control is the first type
decalred in the file. Other wise the designer won't show up. Move all such
decalrations after the form or control class.
 
Just wanted to thank all of you for your input to my dilemma. As is to be
expected, I suppose, this strange error popped up late last night. Troubling
it was! Before going to sleep I wrote out a 5-step Action plan for today,
that started with reviewing any feedback on this thread and ended with
reinstalling Windows!

Thankfully I was able to solve things with Step #2: Remove the current
project, create another [blank] one in its place and then add the project
files back in.

Everything seems to be working again ... though this was a scary experience!

Thank you all again!

--
Robert W.
Vancouver, BC
www.mwtech.com



Stoitcho Goutsev (100) said:
Another wild guess....

1. If you use devenv.exe to compile a silution form the command prompt it
somehow screwup the design time of all forms and controls. I don't know
what's wrong with it, but try to do some modification in the source code
(simple adding of a space somewhere just to make the fild *dirty* and save
it in order to refresh the file on the disk. The close all windows related
to the form or control (code view and designer view) and open them again. It
might help.

2. Make sure that the class declaration of form or control is the first type
decalred in the file. Other wise the designer won't show up. Move all such
decalrations after the form or control class.


--

Stoitcho Goutsev (100) [C# MVP]
Bajoo said:
Robert,
Are you using some custom project/3rd party Library in your
code. I think you are using function in the constructor of the form
which now u are un able to view in the designer, and that function is
not working properly now(May be a database connection).

Regards,
Naveed Ahmad Bajwa
http://bajoo.blogspot.com/
 
Back
Top