Visual Studio 2017 - can't find Visual C++ Windows Forms

Ch3shire picture Ch3shire · Jun 26, 2017 · Viewed 22.6k times · Source

So, I'm in awkward situation - I wanted to create Windows Form App using Visual Studio, but I can't find any place to create Visual C++ Windows Form template. I tried even to reinstall Visual C++, add other libraries and search answer online - no results.

I can of course create new Winforms in C#:

enter image description here

But not in C++:

enter image description here

Also, all possible modules in Visual Studio Update was checked:

enter image description here

I tried even add template from Online list:

enter image description here

What should I do next? I use Visual Studio 2017 Community Edition.

Answer

Ch3shire picture Ch3shire · Jun 27, 2017

Ok, I found a working way to creating Windows Forms in Visual Studio 2017.

  1. Create new CLR Empty Project:

enter image description here

  1. Add .cpp file for main function.

  2. In project add new item from UI->Windows Forms:

enter image description here

(If we didn't add main loop before the error will occur)

  1. Now we can add new elements to form from the Toolbox to the left (i spent measurable time looking for that).

enter image description here

  1. To run application we have to declare this instead of main function:

enter image description here

Also we need to tell Visual Studio that we are making Windows Application instead of Console Application:

enter image description here