Today I stumbled over this issue with the Visual Studio 7 Forms Designer:
"The class Main can be designed, but is not the first class in the file. Visual Studio requires that designers use the first class in the file. Move the class code so that it is the first class in the file and try loading the designer again."
Here is the sample code:
namespace Test
{
public class MyEventArgs {
public string Param1;
public bool Param2;
}
/// <summary>
/// Summary description for Main Form.
/// </summary>
public class Main : System.Windows.Forms.Form
{
}
}
So: avoid this by using separate files for each class if possible or keep at least the forms class code alone.