First, tell us what type of application you are executing...(console app, windows forms, etc.) and tell how you wrote the code or how you compile it...We could certainly help.
make sure you have referenced the form you want to appear first in the program.cs class (if you are loading a windows forms application and have deleted the original form1. If not, then be more specific)
I don't know what your problem is but I have a high degree of certainty that "stdafx.h" has to do with it. This is not C++ standard so you might as well never use it.
IMHO, you should always start a project from an empty project. There is a way to specify that when you are creating a new project (it's not the default). Then, your program should work.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.