viewing form in form designer

Linlor

New member
Joined
Sep 15, 2006
Messages
1
Programming Experience
Beginner
A very simple question for all you experinced Visual Studio IDE users but I am lost.

I created a simple form in the designer window a couple days ago and added a few controls to get used to VB.net. (I am a VB 6.0 coder for the most part).

I saved everything and left. I came back to the app tonight to continue playing and I cannot seem to get my form to open in designer.

When I run the app I have the form come up on the screen and it is laid out just like I made so I know it is out there somewhere, but I can not open the form in design view.

I looked through help and it said to double click the form.vb in Solution Explorer. I do that and the form.vb window opens as a blank code view window.

I must have set some flag wrong when I saved the project last time but I can't get the designer back open for love nor money.

Any ideas will be greatly appreciated.

Thanks
Don
 
It sounds like something has become corrupted. I'd suggest closing all code and design windows, right-clicking your project in the Solution Explorer and selecting Rebuild.
 
What does the icon in the SOlution Explorer look like?

Forms are represented with a little grey wider-than-it-is-high rectangle
Classes are represented as a white bit of paper with VB written on it

A Form is represented by its RESX file, its VB file and its DESIGNER.VB file.

Have a look in your project folder and you should see:
Form1.vb <-- code YOU write for the form
Form1.resx <-- visual design data for the form, made by the IDE
Form1.Designer.vb <--code the IDE writes for the form

If the resx file is missing or damaged the IDE stops treating it as a form and assumes its code you wrote
 
I have found that many of the instabilities that are apparent in .Net 2005 occur in the designer, closely related to the ISelectionService and the IDesignerHost, some exceptions that occur whilst using these services are not handled correctly. A full rebuild of the solution will in most cases correct the problem or closing the form and then opening it again. Failing that we all just a-wait the service pack. Don't worry, i doubt it's anything you have done.
 
Second that.. I frequently get messages such as "VB Compiler has generated an error and needs to close"
or "An error occurred, save all your work and restart VS2005"

My favourites are the ones where you do something trivial like rename a table adapter and suddenly every form in your app stops working because they reference a tableadapter that doesnt exist any more :)

And the one I hate the most is the way VS crashes instantly if you try to add an event handler for something while running/debugging..

Ive grown quite used to nipping into Form1.Designer.vb and commenting out erroneous lines of code..
 
Form not viewable in designer.

This worked for me. Go to the form, go to the designer code where you have PARTIAL CLASS declaration. Change PARTIAL to PUBLIC temporarily, and then Back from Public to Partial. The icon changes and the form gets back to being a form.
 
Back
Top