I am in process of writing a C# Windows Forms application using Visual Studio Express 2010 ENU SP1. Further VS specifics are at the bottom of this post. I recently made so
I accidentally deleted my Form1[Design] file. Double clicking the Form1.h file did nothing. The program ran and the Buttons TextBoxes and Labels were all there just no Form1[Design] was visible to edit. I fixed it Under: Header Files select Form1.h and go to Form1.H file properties. Under File Type from the drop down change it to "C++ Form" I closed and restarted the program. You should now be able to double click Form1.h and see your Form1[design].
Just one more way to screw up the form designer - I had something like this:
namespace MyProgram
{
public struct SomeStruct {
int a,b;
}
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}
Turns out you can't put the SomeStruct definition there even though everything works fine and there were no errors. Once I moved it, I was able to see the designer view again.
I had a similar issue, but not quite the same.
I copied a form from one project to another (using windows explorer) and then added it to the new project by right clicking on the project in VS and choosing > Add > Existing Item.
My mistake was to add all three files for the form (.cs, .designer.cs and .resx). I should have only added the .cs file.