zoukankan
html css js c++ java
Winform 在执行构造函数时如何阻止它运行Load方法
问题描述:
Winform 在执行构造函数时如何阻止它运行Load方法
现在要做一个在线更新的功能,我在主窗体的构造函数 判断版本是否一致,不一致则弹出更新的exe。
但是弹出更新的EXE后,主窗体的FORM_LOAD函数还是会执行。如何阻止它?
解决方案:
可以在Program.cs中的Run前加上判断,如果需要更新,就不要创建主窗体了,直接杀死当前
进程
你应该写在Main函数里面,而不是主窗口的构造函数。构造函数除了“构造”,你不应该让它干别的。
查看全文
相关阅读:
rsync备份服务器搭建学习笔记
switch case
常见http状态码
正则去除html字符串中的注释、标签、属性
2018-10-10 10:00 从今日开始记录
Qt dialog 的geometry()
Qt禁止最大和最小化
tableWidget删除除了头外的内容并释放
Qt QTabBar 实现宽度调整,非QSS
Qt 歌词有关内容
原文地址:https://www.cnblogs.com/ddhj/p/3080241.html
最新文章
MySQL允许任意IP远程连接
MySQL端口3306启动后远程无法连接同时telnet3306不通
lInux系统时间
Linux shell 中$() ` `,${},$[] $(()),[ ] (( )) [[ ]]作用与区别
linux之grep和egrep用法
Linux查看进程完整路劲
Linux之top命令详解
1.4链表重排序
1.3如何计算两个单链表代表的数之和
1.2从链表中移除重复项
热门文章
1.1链表逆序
Linux文件属性及权限
Linux定时任务
常用软件快捷键总结
MySQL主从同步
LNMP环境搭建
Shell脚本编程规范
Linux基础命令总结
NFS共享服务搭建笔记
Nginx部署安装学习笔记
Copyright © 2011-2022 走看看