Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 949
Ch3shire Avatar asked Jun 26 '17 21:06

Ch3shire


People also ask

How do I add a form in Visual Studio 2019 C ++?

Choose the menu item “Visual C++|UI”, and select the item “Windows Form”. Click the Add button.


1 Answers

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

like image 52
Ch3shire Avatar answered Oct 01 '22 03:10

Ch3shire