我到处都看了,找不到答案。我如何获取布尔值,如果表单处于活动状态或非活动状态。
伪:
'If the form is active
'Do this
'else If the form is not active
'Do this
谢谢
这是我最后使用的:
Private formActive As Boolean
Private Sub form1_Activated(sender As Object, e As EventArgs) Handles MyBase.Activated
formActive = True
End Sub
Private Sub mainForm_Deactivate(sender As Object, e As EventArgs) Handles MyBase.Deactivate
formActive = False
End Sub
然后:
If formActive = True
'If the form is active
else
'If the form is not active
End If
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句