Form disappeared

  • Thread starter Thread starter Jon
  • Start date Start date
J

Jon

I posted this in another group, but it doesn't get much traffic, so I'm
reporting here...

I have a project with one form and several classes, etc. All of the sudden,
today when I open the solution, the form no longer has a GUI design
component to it. When I click on it, it only shows the source code and the
icon has changed from the little form icon to a vb class icon. Any idea
what on earth might have happened? I did a repair installation of VS.Net
2003 and have rebooted, reloaded the solution a few times. Help, please!


--
*********************
Jon Rosenberg
www.DeanForAmerica.com
www.OhioForDean.org
www.NEOhioForDean.com
AOL IM: QJ2X
 
Keep your politcal crap out of the newsgroup. This not
the place to promote your politcal garbage.
 
Have you tried refeshing the solution explorer with the little refresh
button at the top of the solution explorer panel??

Often when the graphics and IDE behave that way its because you have a
naming conflict with another class. Check to make sure you dont have
two classes/forms with the same name..


If worst comes to worst, just create a new form and cut and paste the
old code into it after removing the default code.

If you still have the problem there a good chance the problem lies in
your class code not your IDE.

HTH

Richard
 
Hi Jon,

You changed somewhere a reference, the most easy could be that you deleted
or changed the
Inherits System.Windows.Forms.Form
Or something

I hope this helps?

Cor
 
Hi Jon, Perhaps your project file has gone up the .NET creek, with no System
namespace. It's in there that all the types of object and whatnot are stored
so that the IDE knows what to do with the code files... an interesting point
is that your form class *must* be the first class to appear in the code
file, if you want to use the designer, it must be above any other classes,
but obviously after any "Imports" statements....

' === This is correct...

Imports System

Public Class MyForm
Inherits Form
 
* "Jon said:
I have a project with one form and several classes, etc. All of the sudden,
today when I open the solution, the form no longer has a GUI design
component to it. When I click on it, it only shows the source code and the
icon has changed from the little form icon to a vb class icon. Any idea
what on earth might have happened? I did a repair installation of VS.Net
2003 and have rebooted, reloaded the solution a few times. Help, please!

Right-click the form in the solution explorer, choose "Open with..."
from its context menu and select the Forms editor (if available).
 
Thanks to everyone who replied. Somehow, the Imports System statement
disappeared. Adding it back in fixed the problem!

Thanks again
 
Back
Top