0
votes

I'm trying to make a great GUI for my csgo cheat. I decided to use C++/CLR. Firstly I create empty project then, I change in a properties entrypoint and the subsystem and I add this code to the cpp file:

#include "MyForm.h"

using namespace System;`

using namespace System::Windows::Forms;`

[STAThreadAttribute]
void Main(array<System::String ^> ^args)
{
 Application::EnableVisualStyles();
 Application::SetCompatibleTextRenderingDefault(false);
 SmallPackofCheats::MyForm mainForm;
 Application::Run(%mainForm);
}

Then I save it and I restart visual studio. I run visual studio and I design menu. Designer works. After ended work I save everything and I close Visual Studio. Every next run of the Visual Studio and after opening my project I have this problem: image link

How to solve this problem? Thanks in advance.

1
This VS feature is not actively being maintained anymore since the C++ Winforms templates were removed in VS2012. Stuff keeps falling off with each release. This particular issue is not a huge problem, rebuilding the project was always enough in my experience. More about this in this post.Hans Passant
Thank you very much you've solved my problem every thing works after cleaning and rebulding project.user8233624

1 Answers

3
votes

I encountered a similar problem recently and the other suggested solutions did not help. This method, however, did work:

  1. Window -> Close all Documents (or at least ensure that every designer window is closed)
  2. Close VS and restart it (important!)
  3. Reopen the solution
  4. Build -> Rebuild Solution

Now you should be able to open the designer.