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.
© Copyright 2002-2008, Torsten Rendelmann Page rendered at Wednesday, November 19, 2008 3:38:54 PM (W. Europe Standard Time, UTC+01:00)
Like RSS Bandit? Make a donation to help support its development and maintenance. As little as 1€ will help.
SUBSCRIBE RSS GeoURL
newtelligence dasBlog 2.1.8102.813
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.