vb 点击关闭按钮时窗体隐藏
答案:5 悬赏:40 手机版
解决时间 2021-03-22 04:28
- 提问者网友:孤凫
- 2021-03-21 11:52
vb 点击关闭按钮时窗体隐藏
最佳答案
- 五星知识达人网友:纵马山川剑自提
- 2021-03-21 12:13
vb 点击关闭按钮时会产生 UnloadMode = 0,可以通过它来判断实现。
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = 0 Then
Me.Hide
Cancel = 1
End if
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = 0 Then
Me.Hide
Cancel = 1
End if
End Sub
全部回答
- 1楼网友:夜余生
- 2021-03-21 17:50
在command1下输入me.hide
- 2楼网友:十年萤火照君眠
- 2021-03-21 16:15
Private Sub Form_Unload(Cancel As Integer)
Cancel = 1
Me.Hide
End Sub
Cancel = 1
Me.Hide
End Sub
- 3楼网友:行路难
- 2021-03-21 14:47
Private Sub Command1_Click()
End
End Sub
Private Sub Form_Unload(Cancel As Integer)
Cancel = 1
Me.Hide
End Sub
End
End Sub
Private Sub Form_Unload(Cancel As Integer)
Cancel = 1
Me.Hide
End Sub
- 4楼网友:刀戟声无边
- 2021-03-21 13:38
用UnloadMode进行判断,点窗体关闭按钮时UnloadMode = 0,其它情况为非0
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = 0 Then
Cancel = 1
Me.Hide
End If
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = 0 Then
Cancel = 1
Me.Hide
End If
End Sub
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯