I made a test program WinForm, but when I open it, the program opens with CMD, but I didn’t want to. How to fix it?

using System;
using System.Drawing;
using System.Windows.Forms;
class MForm : Form {
public MForm() {
Text = "Programm";
ms.Parent = this;
ToolStripMenuItem file = new ToolStripMenuItem("&File");
ToolStripMenuItem exit = new ToolStripMenuItem("&Exit", null,
new EventHandler(OnExit));
exit.ShortcutKeys = Keys.Control | Keys.X;
file.DropDownItems.Add(exit);
ms.Items.Add(file);
MainMenuStrip = ms;
Size = new Size(250, 200);
CenterToScreen();
}
void OnExit(object sender, EventArgs e) {
Close();
}
}
class MApplication {
public static void Main() {
Application.Run(new MForm());
}
}
I made a test program WinForm, but when I open it, the program opens with CMD, but I didn’t want to. How to fix it?
using System;
using System.Drawing;
using System.Windows.Forms;
class MForm : Form {
public MForm() {
Text = "Programm";
}
class MApplication {
public static void Main() {
Application.Run(new MForm());
}
}