C# 窗体 点击运行时一闪就没了
代码如下:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace ZDY
{
public class Form1
{
public static void Main()
{
MyForm mf = new MyForm();
//MessageBox.Show("");
mf.Show();
}
}
class MyForm : Form
{
public MyForm()
{
this.Size = new Size(1000,500);
this.BackColor = Color.Red;
}
}
}