Hi shams-4721,
Please follow the steps below:
1.Close the error page and add the following code to the MyForm.cpp:(my project name is Project8)
using namespace System;
using namespace System::Windows::Forms;
[STAThreadAttribute]
void Main(array<String^>^ args) {
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
Project8(your project name)::MyForm form;
Application::Run(%form);
}
2.Right click on the your project name and choose Properties option.
3.Then
4.Reopen your project.
There is a more detailed step in this thread you can refer to.
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.