源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

c# 关闭窗体时提示的小例子

  • 时间:2021-10-15 18:10 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:c# 关闭窗体时提示的小例子
[u]复制代码[/u] 代码如下:
private void WorkflowConfigure_FormClosing(object sender, FormClosingEventArgs e)         {             DialogResult result = MessageBox.Show("此操作会丢弃您的当前设置,确定要继续?", "退出", MessageBoxButtons.YesNo, MessageBoxIcon.Question);             if (DialogResult.Yes == result)             {                 e.Cancel = false;   // Cancel属性如果为true,表示取消该事件的执行。             }             else             {                 e.Cancel = true;             }         }
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部