Forms.Message类型怎么用?

来源:百度知道 编辑:UC知道 时间:2024/06/01 02:28:22
给个示例~谢谢

参考连接:http://zhidao.baidu.com/question/59868434.html
private bool isExitApp = false;
private const int WM_QUERYENDSESSION = 0x0011;
protected override void WndProc(ref Message m)
{
switch (m.Msg)
{
case WM_QUERYENDSESSION:
isExitApp = true;
break;
default:
base.WndProc(ref m);
break;
}

}
private void Form7_FormClosing(object sender, FormClosingEventArgs e)
{
if (!this.isExitApp)
{
e.Cancel = true;
this.WindowState = FormWindowState.Minimized;
this.Hide();
}

}

Forms.Message.show("这里写字符串!")