Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Tuesday, July 30, 2019 2:50 PM
Hello,
I am new to VS. I used to code my apps with Borland/Embarcedero C++ Builder. Now I try to start with VS and my c++ windows project does not have a form to design. When I start a C# project, it does have a form. Is visual studio only then visual, when I choose C# and not C++?
All replies (12)
Tuesday, July 30, 2019 3:07 PM
Hello,
I am new to VS. I used to code my apps with Borland/Embarcedero C++ Builder. Now I try to start with VS and my c++ windows project does not have a form to design. When I start a C# project, it does have a form. Is visual studio only then visual, when I choose C# and not C++?
Microsoft removed the templates to create Windows Forms applications using VC++ a long time ago. However, there are several threads in the forums about how to manually create a Wndows Form project using VC++. One of them is at Create C++ Windows Forms application in Visual Studio 2017
Tuesday, July 30, 2019 4:07 PM
However, there are several threads in the forums about how to manually create a Wndows Form project using VC++. One of them is at Create C++ Windows Forms application in Visual Studio 2017
This does not work in newest 2019-16.2 version. It looks like Microsoft is tightening its grip on this. The conclusion would be: if I like C++ then go back to Borland. If Microsoft IDE - then unportable windows only C#. Tough choice.
Tuesday, July 30, 2019 8:26 PM
The thing is, Visual C++ has never really had a native form designer. It does have the resource designer for dialog box templates but nothing more.
The form designer that was added to C++ for a time was a .NET framework thing, it never applied to native C++ applications.
The resource designer exists in Visual Studio 2019, but there has never been any automation in the resource designer. So you would have to write everything manually.
This is a signature. Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
Wednesday, July 31, 2019 12:21 AM
You do not specify whether you want to use .Net or not. If not .Net then you can use MFC and MFC forms do have a designer.
Sam Hobbs
SimpleSamples.Info
Wednesday, July 31, 2019 5:32 AM
Hi pellori,
Welcome to the MSDN forum.
Visual Studio 2017 and earlier version support creating C++ Windows Forms application. But it actually can not create a C++ Windows Forms application in Visual Studio 2019 for now. If you still want this module in Visual Studio 2019, you can choose menu Help->Send Feedback->Report a Problem to reflect your issue.
l hope it could help you.
Best Regards,
Perry
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]
Wednesday, July 31, 2019 6:59 AM
Visual Studio 2017 and earlier version support creating C++ Windows Forms application.
It is not clear that you mean Windows Forms as in .Net but I assume you do so it would be good too say that explicitly.
Sam Hobbs
SimpleSamples.Info
Wednesday, July 31, 2019 7:20 AM
Thank you for your answers. What you write ensures me, that swimming against tide would be quite unwise. If MS is showing me, that C# is the way to go for desktop apps using MS IDE, then so it will be for some significant time. I do not want to make my life harder. The question for me is whether I will go C# or not, and this I will decide myself in few weeks. Thank you again.
Wednesday, July 31, 2019 7:37 AM
It is just the combination of .Net for the UI and C++ that can be difficult. C++, especially C++/CLR, can be good for the non-UI programming and Standard C++ can be combined with C++/CLR. Using C++ you can use MFC for the UI but MFC is dwindling in use.
Sam Hobbs
SimpleSamples.Info
Wednesday, July 31, 2019 2:11 PM
If we followed what Microsoft wanted regarding C# then C++ would be long dead. However C++ has been hanging in there, with a greater usage that C#. (source)
If you look at the graph over the years, C++ has gotten a bit of a boost with the release of C++17 and there was only one brief year where the C# usage was higher than C++.
So if you are going to go by what is popular, wouldn't you be using Java or C?
Also, as an interesting side note:
The resource designer is very much alive and doesn't require .NET languages or MFC. Also the big applications that I work on don't use a form designer.
This is a signature. Any samples given are not meant to have error checking or show best practices. They are meant to just illustrate a point. I may also give inefficient code or introduce some problems to discourage copy/paste coding. This is because the major point of my posts is to aid in the learning process.
Wednesday, July 31, 2019 7:13 PM
I think your mind is made up that Visual Studio is not for you and you want us to provide you with justification. VS is the best there is for using C++ in the Windows environment. I do not know what Borland/Embarcedero C++ Builder has to offer but I assume it has limitations and if the limitations are acceptable then I do not understand the need for this discussion.
Sam Hobbs
SimpleSamples.Info
Friday, August 2, 2019 9:28 AM
Hi pellori,
I have tried to follow the above thread to create a C++ windows forms application in VS 2019 16.2.0. It could work in my side. Please note the "WinformCDemo" is the name of actual project. For example, my project name is "Project1"
Could you share the error when you follow the thread? Then we could try our best to provide a solution for you.
Any feedback will be expected.
Best Regards,
Dylan
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]
Tuesday, August 6, 2019 10:38 AM
Hi pellori,
Did the reply help you solve your problem? If the reply is helpful for you, please remember marking as answer. If you still have any concern, please feel free to let us know.
Best Regards,
Perry
MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected]