Why does C#Winform have no form designer, but only code?

The form designer can't display only the code, but the program box can be displayed normally when the program is running.
The design interface is not opened when using the right-click cs file:
(using shift+F7 is also useless) I
Insert picture description here
checked some blogs, such as this.add(), not installed, and finally found the reason: you can’t write don’t before the Form The code of the class is as shown in the following figure:
Insert picture description here
Move the Role code below:
use the right mouse button to view the cs file and open the designer again or shift+F7
Insert picture description here

Guess you like

Origin blog.csdn.net/ylwhxht/article/details/108923551