From the toolbox flyout you should be able to just drag them over and drop on form.
--please don't forget to Accept as answer if the reply is helpful--
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Using VC++ 2019 Comm Ed. under Win 10 building a Windows
Form application.
I would like to add controls to my form by using the ToolBox dialog editor.
I can use the dialog editor to add controls to the Help| About Message dialog.
So I know the Dialog editor is present. But how do I add controls to
the main form which now is blank and has only File and Help menu items ?
TIA
Bob
From the toolbox flyout you should be able to just drag them over and drop on form.
--please don't forget to Accept as answer if the reply is helpful--
Hi srfpala,
Could your form be displayed normally as shown below?
If not, please follow the steps below:
1.Create new CLR Empty Project.
2.Right-click your project name and add new item from UI->Windows Forms.
3. Next, you will go to Project>>Properties>>Linker>>System, in the field "SubSystem" you choose "Windows (/SUBSYSTEM:WINDOWS)", click Apply.
And then go to Project>>Properties>>Linker>>Advanced, in the field "entry point", input value "Main" and Apply, finally click OK.
After, you go to file code of form you created(ex: MyForm.cpp) and input code bellow to this file(Project1 is my test project name, you need to change to your project name.)
using namespace System;
using namespace System::Windows::Forms;
[STAThreadAttribute]
void Main(array<String^>^ args)
{
Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false); Project1::MyForm form; Application::Run(%form);
}
4.Save and exit visual studio, and then open it again, UI Form will work.
5.Finallly, you can drag controls from Toolbox to MyForm.h[Design]
Here some related links you can refer to.
Visual Studio 2017 - can't find Visual C++ Windows Forms
Visual Studio 2017 and 2019 C++/CLI Missing
Best Regards,
Daniel Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Daniel
I think I may have found an easier solution which worked nicely for me.
See
https://www.rkaiser.de/wp-content/uploads/2019/04/cpp-2019-WinForms-Anleitung-EN.pdf
Give it a try and let me know what you think.
Bob
Sorry about the link. Try this
https://marketplace.visualstudio.com/items?itemName=RichardKaiser.CppWinformsVS2019VSIX001
Let me know what you think.
Bob