如何在form1里面判断form2是否关闭
我想在form1里面判断form2是否关闭,可不可以用这样的语句if unform2 then
c=0
end if
2010-10-22 20:34
2010-10-22 23:45
2010-10-23 00:33
程序代码:Private Sub Command1_Click()
Dim a As Form
Dim b As Boolean
For Each a In Forms
If a.Name = "Form2" Then b = True
Next
If b = False Then
MsgBox "名称为Form2的窗体没有被加载"
Else
MsgBox "名称为Form2的窗体已经被加载,如果你看不到此窗体,它可能被HIDE了或者VISIBLE被设为FALSE了"
End If
End Sub

2010-10-23 18:35