Reputation: 61
I am new to Visual Studio 2010 and I am trying to develop a Windows Form. I do not see a Design tab where I can toggle between the form design and the .cs code. How can I do this?
Thanks
Upvotes: 3
Views: 21898
Reputation: 11
I ran into this also. My problem was that without realizing it, I had deleted the declaration of the class and then saved.
Symptoms of this issue include: Wrong icon in Solution Explorer + no "View Designer" option
Moreover, if you double click the form, you result in an empty sheet.
To fix this, simply declare your class once again by double clicking on your form (in my case frmDialogs.vb), and adding the class declaration. Because my class is called frmDialogs, my code looks like this:
Public Class frmDialogs
End Class
Save. Then you will notice the icon return to that of a form, and you will have the ability to enter design mode once again: Normal form Icon and View Designer
Once again we can access the Form in Design.
I hope you find this information helpful! I tried to post with more screenshots but Stackoverflow did not let me since this is my first answer. If helpful please vote for my post as I need 10 reputation points to include more screenshots for future answers. Thanks!
Upvotes: 1
Reputation: 31
tools -> Options -> HTML Designer then click the Enable HTML designer and restart.
Upvotes: 3
Reputation: 16368
The designer and code will actually be 2 separate tabs. To view the designer, right click the form in the Solution Explorer and choose View Designer. To view code, right click the form in the Solution Explorer and choose View Code.
If you have the code file open, you can right click anywhere in code window and choose View Designer.
Upvotes: 3