This article is a mirror article of machine translation, please click here to jump to the original article.

View: 22768|Reply: 1

[Source] The class Form1 can be designed, but it is not the first class in the file. Visual Studio requires designers to use the document

[Copy link]
Posted on 4/15/2017 10:48:35 AM | | |
The frmMain class can be designed, but not the first class in the file. Visual Studio requires the designer to use the first class in the file. Move the class code to make it the first class in the file, and then try to reload the designer.
Error prompt:
The class Form1 can be designed, but it is not the first class in the file.

This is a Visual Studio designer loading error.

Cause:
Visual Studio requires the designer to use the first class in the file. Move the class code to make it the first class in the file, and then try to reload the designer.

If you want to use Visual Studio to design a class such as Form, then the Form class code must be at the top of the code file where the Form class is located.

For example:



This allows Visual Studio to load the design correctly.

The following code cannot be designed:







Previous:【Reprint】Windows 7 system shutdown slow solution
Next:log4net's ConversionPattern parameter
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com