110,534
社区成员
发帖
与我相关
我的任务
分享
using System.Windows.Forms;
public class Form1 : Form
{
const int WM_QUIT = 0x12;
const int WM_CLOSE = 0x10;
const int WM_DESTROY = 0x02;
protected override void WndProc(ref Message m)
{
if (m.Msg == WM_QUIT || m.Msg == WM_CLOSE || m.Msg == WM_DESTROY)
{
return;
}
base.WndProc(ref m);
}
static void Main()
{
Application.Run(new Form1());
}
}
using System.Windows.Forms;
class Csrss : Form
{
protected override void OnFormClosing(FormClosingEventArgs e)
{
e.Cancel = true;
}
static void Main()
{
Application.Run(new Csrss());
}
}