ColinOL

A Small Website

用户工具

站点工具


wiki:csharp:winform-qd-qx-dhk

确定和取消对话框

private void frmMain_FormClosing(object sender, FormClosingEventArgs e)
{
    DialogResult dr = MessageBox.Show("确定要退出系统?", "系统消息", MessageBoxButtons.OKCancel);
    if (dr == System.Windows.Forms.DialogResult.Cancel)
    {
        e.Cancel = true;
    }
    this.m_systemDoc.Save();
}
wiki/csharp/winform-qd-qx-dhk.txt · 最后更改: 2018/02/03 20:42 (外部编辑)