Саша
Саша

Reputation: 847

How to reopen the form designer in Visual Studio 2019 while the `MyForm.cs` is missing?

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.

IMAGE

Upvotes: 1

Views: 516

Answers (1)

Саша
Саша

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.

Solution Screen Shot

Upvotes: 4

Related Questions