Reputation: 847
I Created a windows form by using an empty C++
CLR
project and got an error in a new tab of form designer
and I closed that tab and fixed the error in MyForm.cpp
by copying the following code:
#include "MyForm.h"
using namespace System;
using namespace System::Windows::Forms;
[STAThreadAttribute]
void Main(array<String^>^ args) {
Application::EnableVisualStyles();
Application::SetCompatibleTextRenderingDefault(false);
//MFP10 is your project name
MFP10::MyForm form;
Application::Run(%form);
}
and now I am trying to access that designer form tab by double clicking the MyForm.h
, suddenly it is showing me the code instead of opening the form in the designer.
Upvotes: 1
Views: 516
Reputation: 847
I solved the Issue. If you have this Issue you can follow the steps to solve it.
According to the version I am using is VS Enterprise 2019 Registered
Steps:
Options>>Environment>>Preview Features >> and
Enable the Preview of .net Core SDK
Restart the app and open the project and double click on the MyForm.h
under header directory.
Upvotes: 4