Missing Form Component

T

thomasjbs

I have a project solution that has two FORMs on it that I created by
dragging and dropping components onto it.

My project is now missing both FORM components. I used to be able to
edit the Forms and drag and drop objects to it. Now I can't see the
GUI forms anymore.

It still compiles and runs successfully, and I can see the DESIGN mode
code that creates the components and adds them to the form, but I
cannot figure out how to show the GUI DESIGN mode components of my two
forms.

Anyone have any idea why this is happening?
 
J

Jay Dee

If it still compiles even after deleting the bin folder from the
solution using explorer then the forms are there somewhere.

Are you shore they have not ended up somewhere like in the properties
folder along with AsemblyInfo.cs and Resources.resx, if they are in
there then the project will still compile

Note make a copy of the whole solution before deleting the bin folder
just in case
 
F

Family Tree Mike

I have a project solution that has two FORMs on it that I created by
dragging and dropping components onto it.

My project is now missing both FORM components. I used to be able to
edit the Forms and drag and drop objects to it. Now I can't see the
GUI forms anymore.

It still compiles and runs successfully, and I can see the DESIGN mode
code that creates the components and adds them to the form, but I
cannot figure out how to show the GUI DESIGN mode components of my two
forms.

Anyone have any idea why this is happening?


If you right-click on the form class in the solution explorer, can you
choose "View Designer"? If so, what happens?
 
T

Thomasjbs

Thats the whole problem - The VIEW DESIGNER option is missing now. I still
see the Form1.Designer.cs and Form2.Designer.cs files and I see the source
code in them - but it's as if the IDE won't let me edit the forms using the
GUI.

There must be some association that is missing somewhere that links the cs
files to a GUI component.
 
T

Thomasjbs

Assuming this is the case ( and they are in another folder), where SHOULD
they be?

I have a backup. I deleted the BIN folder and re-ran it. Runs
successfully, but the option to view the GUI DESIGNER is not there.
 
F

Family Tree Mike

Thomasjbs said:
Thats the whole problem - The VIEW DESIGNER option is missing now. I
still
see the Form1.Designer.cs and Form2.Designer.cs files and I see the
source
code in them - but it's as if the IDE won't let me edit the forms using
the
GUI.

There must be some association that is missing somewhere that links the cs
files to a GUI component.


Do you have the same problem if you right-click form1.cs or form2.cs (that
is, not the .designer.cs files)?
 
T

Thomasjbs

Yes - The VIEW DESIGNERmode is not available anywhere there.

However I made another discovery. By creating a brand new application and
form, I noticed that the FORM component is a SUB-Component of the form1.cs
component.

This is NOT the case with my project - although it used to be. It appears
that the Form1.Designer.cs file and Form2.Designer.cs file. And that kind of
makes sense. Since they are not associated in the package, I am not able to
VIEW the Designer Code gui component (since it does not appear to exist).
But when compiling, since each CS file is compiled separately, all resources
are there and available when called, so it works.

The question now is: How do I re-associate the GUI FORM CODE modules to
their respective Form1.cs and Form2.cs files. (how do I make them
sub-components in the csharp Development app).
 
J

Jay Dee

If you find the form.cs and form.desiger.cs files in explorer and make
a copy of them, then delete them from your project you can then drag
the files from explorer over the Solution Explorer panel and they will
be added back to your solutions in the correct locations. I would try
that.
 
T

Thomasjbs

Thanks guys - Design Mode is back now. After I BACKED them UP, deleted them
from the project and re-added them, the associations were restored and I can
now EDIT the GUI Components (drag and drop).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top