社区
VB
帖子详情
如何在vb的closing事件中加入判断,当选择否时不退出窗体
lly20000
2003-08-30 10:07:23
如何在vb的closing事件中加入判断,当选择否时不退出窗体
...全文
129
4
打赏
收藏
如何在vb的closing事件中加入判断,当选择否时不退出窗体
如何在vb的closing事件中加入判断,当选择否时不退出窗体
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
szch
2003-08-30
打赏
举报
回复
在closing事件中加入
if msgbox("退出否",MessageBoxButtons.YesNo)=DialogResult.No Then
e.Cancel = True '终止关闭窗体
End If
benlee
2003-08-30
打赏
举报
回复
e.Cancel = True
saucer
2003-08-30
打赏
举报
回复
Protected Overrides Sub OnClosing (ByVal e As CancelEventArgs)
Dim Buttons As MessageBoxButtons = MessageBoxButtons.YesNo
Dim Result As DialogResult
Result = MessageBox.Show(Me, "sure to close?", "hello", Buttons)
If Result = DialogResult.No Then
e.Cancel = True
End If
End Sub
jsfeiyu
2003-08-30
打赏
举报
回复
If MsgBox("是否确定要退出?", MsgBoxStyle.OKCancel, "提示!")=MsgBoxResult.Cancel Then
e.Cancel = True
Else
Application.Exit()
End If
VB
自动关机源码.rar
设置
窗体
的代码解释 Imports System.Diagnostics Public
Cl
ass 设置
窗体
Private shutTime As Stri
ng
'关机时间的字符串 Private IsToday As Boolean = True '
判断
是否是今天的变量 Private delay As Integer '...
VB
.NET是如何关闭
窗体
.
1、在
VB
.NET
中
取消
窗体
的关闭
事件
;2、如何取消
窗体
上关闭按钮功能;3、
窗体
终止
事件
的过程,见如下说明 如果只是关闭
窗体
,请调用该
窗体
的
Cl
ose命令。 如果你将应用程序项目的启动
窗体
设顶成某个
窗体
,则调用该启动...
科学智能-人工智能新浪潮
Lecture theme: AI-for-Science: The next wave of artificial intelligenceSession 1:Overview:AI-for-Science: The next wave of artificialAI Boomi
ng
AI: From Mimicki
ng
Human to Discoveri
ng
the WorldScience: Discover and Cha
ng
e the WorldFour Paradigms of Science
Cl
osi
ng
the Loop of Scientific DiscoverySession 2:Solvi
ng
Scientific EquationsGraphormer for Molecular Modeli
ng
Molecular SimulationAI Models for Molecular Simulatio
nG
raphormerGraphormer: ResultsMD Simulation for SARS-COV-2The “Wedge” Effect of NTDDeepVortexNet for Fluid Modeli
ng
Meteorological SimulationPhysics-informed Neural NetworkFrom Derivative-based to Monte-CarloDeep Vortex NetworkSession 3:Mini
ng
Experimental ObservationsLorentzNet for Parti
cl
e DetectionParti
cl
e DetectionJet Analysis and Group EquivarianceProblems with Existi
ng
AI ModelsLorentzNetExperimental ResultsSPT-Scientific La
ng
uage ModelSPT: Foundation Model for ScienceEffective Traini
ng
: A System WorkEffective Inference: Double PromptsExperimental ResultsSession 4:Discoveri
ng
New ScienceAI for New Physics DetectionForce Field Decomp
osi
ng
Learni
ng
Non-conservative DynamicsExperimental ResultsTarget ApplicationsMore of Our Recent ResearchMicrosoft Research AI4Science
vb
.net 教程 3-2
窗体
编程之
窗体
3
版权声明:本文为博主原创文章,转载请在显著位置标明本文出处以及作者网名,未经作者允许不得用于商业目的。 为
窗体
/控件添加
事件
的方法: ...
选择
某个控件或者(Form1
事件
),比如选
中
(form1
事件
),就可以在
WinForm
窗体
关闭程序
退出
实现
只是关闭当前窗口,若不是主
窗体
的话,是无法
退出
程序的,另外若有托管线程(非主线程),也无法干净地
退出
; 2.Application.Exit(); 强制所有消息
中
止,
退出
所有的
窗体
,但是若有托管线程(非主线程),也无法干净...
VB
16,555
社区成员
110,528
社区内容
发帖
与我相关
我的任务
VB
VB技术相关讨论,主要为经典vb,即VB6.0
复制链接
扫一扫
分享
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章