1个回答
展开全部
string message = "要关闭窗口?";
string caption = "提示";
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
DialogResult result; // Displays the MessageBox. result = MessageBox.Show(this, message, caption, buttons,
MessageBoxIcon.Question); if (result == DialogResult.No)
{ // Closes the parent form. this.Close(); }
string caption = "提示";
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
DialogResult result; // Displays the MessageBox. result = MessageBox.Show(this, message, caption, buttons,
MessageBoxIcon.Question); if (result == DialogResult.No)
{ // Closes the parent form. this.Close(); }
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询