How do I open a Visual Studio project in design vi

2019-01-14 20:51发布

I saved my project, but now I can't open it up in design view where you see all the buttons and stuff. Visual Studio 2012 Anyone know how?

4条回答
可以哭但决不认输i
2楼-- · 2019-01-14 20:56

From the Solution Explorer window select your form, right-click, click on View Designer. Voila! The form should display.

I tried posting a couple screenshots, but this is my first post; therefore, I could not post any images.

查看更多
看我几分像从前
3楼-- · 2019-01-14 20:59

My problem, it showed an error called "The class Form1 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. ". So I moved the Form class to the first one and it worked. :)

查看更多
不美不萌又怎样
4楼-- · 2019-01-14 21:00

Click on the form in the Solution Explorer

查看更多
等我变得足够好
5楼-- · 2019-01-14 21:10

You can double click directly on the .cs file representing your form in the Solution Explorer :

Solution explorer with Design View circled

This will open Form1.cs [Design], which contains the drag&drop controls.

If you are directly in the code behind (The file named Form1.cs, without "[Design]"), you can press Shift + F7 (or only F7 depending on the project type) instead to open it.

From the design view, you can switch back to the Code Behind by pressing F7.

查看更多
登录 后发表回答