c# 关闭窗体时提示的小例子
时间:2021-11-10 19:08:18
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;
}
}
标签:关闭,窗体,提示
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
intellij idea中spring boot properties文件不能自动提示问题解决
2021-09-24 09:53:46
![](https://img.aspxhome.com/file/2023/2/62442_0s.png)
浅谈Android 指纹解锁技术
2023-06-04 18:59:06
![](https://img.aspxhome.com/file/2023/3/104663_0s.jpg)
JFinal实现伪静态的方法
2023-07-17 12:11:37
![](https://img.aspxhome.com/file/2023/0/57630_0s.jpg)
springBoot集成Elasticsearch 报错 Health check failed的解决
2022-12-07 05:18:16
![](https://img.aspxhome.com/file/2023/2/69872_0s.jpg)
Android仿知乎客户端关注和取消关注的按钮点击特效实现思路详解
2022-08-05 19:49:02
![](https://img.aspxhome.com/file/2023/5/94975_0s.png)
Android 简单实现倒计时功能
2023-06-27 11:35:40
![](https://img.aspxhome.com/file/2023/5/91035_0s.jpg)
如何写好一个Spring组件的实现步骤
2023-01-08 20:24:12
![](https://img.aspxhome.com/file/2023/2/75032_0s.jpg)
详解Java异常处理中finally子句的运用
2023-11-29 10:10:30
基于Freemarker和xml实现Java导出word
2022-07-11 23:15:12
![](https://img.aspxhome.com/file/2023/2/113442_0s.png)
kill命令在Java应用中使用的注意事项小结
2023-11-11 13:01:55
![](https://img.aspxhome.com/file/2023/9/58889_0s.jpg)
java8 利用reduce实现将列表中的多个元素的属性求和并返回操作
2021-09-29 06:53:38
SpringBoot打包发布到linux上(centos 7)的步骤
2023-08-11 06:35:55
![](https://img.aspxhome.com/file/2023/5/57945_0s.png)
MyBatis传入集合 list 数组 map参数的写法
2022-12-02 20:21:45
一文带你学会规则引擎Drools的应用
2022-04-03 08:40:59
![](https://img.aspxhome.com/file/2023/0/66670_0s.png)
Android编程显示网络上的图片实例详解
2021-11-29 05:21:10
![](https://img.aspxhome.com/file/2023/9/90189_0s.jpg)
C#使用iTextSharp从PDF文档获取内容的方法
2021-06-12 04:01:11
Java Maven高级之插件开发详解
2023-05-11 19:10:02
![](https://img.aspxhome.com/file/2023/6/79306_0s.png)
c#中task与thread区别及其使用的方法示例
2021-08-06 13:59:10
![](https://img.aspxhome.com/file/2023/7/86947_0s.jpg)
解决RedisTemplate调用increment报错问题
2023-11-20 06:35:05
C# datagrid非常规方法实现添加合并列
2023-02-08 07:31:00
![](https://img.aspxhome.com/file/2023/3/71743_0s.jpg)