Can't find Windows Forms Application for C++
Solution 1:
There are no C++ Windows Form templates in Visual Studio 2015. As I see it, you have two choices:
- When creating a new project, You will see an online dropdown, click that and try to search for "C++ Windows Forms".
-
Create an empty C++ CLR project and add a Windows Forms to it. This link puts it like this (credit to the onContentStop, the user who posted this):
- Make a "CLR Empty Project".
- Press Ctrl-Shift-A and create a Windows Form (under UI).
-
Inside the CPP file that is created, paste this code, replacing anything in square brackets except
[STAThread]
with the appropriate names:#include "[FORM NAME].h" using namespace System; using namespace System::Windows::Forms; [STAThread]//leave this as is void main(array<String^>^ args) { Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false); Application::Run(gcnew [PROJECT NAME]::[FORM NAME]); }
Right click your project in the Solution Explorer and click Properties.
- Under Configuration Properties > Linker > Advanced, change Entry Point to "main" (without quotation marks).
- Under Configuration Properties > Linker > System, change SubSystem to "Windows (/SUBSYSTEM:WINDOWS)" (without quotation marks).
Solution 2:
Though this has already been answered, I feel like this might help those who stumble across this in the future. While creating a new project, directly above the text field for naming your project, there is a blue link that reads "Click here to go online and find templates" If you click that link it will direct you to templates that are available for you to download & use. Simply use the hierarchy on the left hand side and navigate to Visual C++ and you should be able to simply click "C++ Windows Forms" and it will create the new project, while also downloading and installing the template for future use. So, next time you go to create a C++ Winform you wont have to search for it again.