例子截获点击关闭按扭的消息:点关闭按扭无效
protected override void WndProc(ref Message m)
{
const int SC_CLOSE = 0xF120;
const int WM_SYSCOMMAND = 0x0112;
if(m.Msg == WM_SYSCOMMAND && (int)m.WParam == SC_CLOSE)
{
return;
}
base.WndProc(ref m);
}
protected override void WndProc(ref Message m)
{
const int SC_CLOSE = 0xF120;
const int WM_SYSCOMMAND = 0x0112;
if(m.Msg == WM_SYSCOMMAND && (int)m.WParam == SC_CLOSE)
{
return;
}
base.WndProc(ref m);
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货