下面是个超简单的判断窗体是否打开地两种办法教程,图老师小编精心挑选推荐,大家行行好,多给几个赞吧,小编吐血跪求~
【 tulaoshi.com - 编程语言 】
判断窗体是否打开的两种方法
Function IsLoaded(strName As String, Optional intObjectType As Integer =
acForm)
IsLoaded = (SysCmd(acSysCmdGetObjectState, intObjectType, strName) 0)
End Function
函数二
Function IsFormLoaded(strFrmName As String) As Boolean
Const conFormDesign = 0
Dim intX As Integer
IsFormLoaded= False
For intX = 0 To Forms.Count - 1
If Forms(intX).FormName = strFrmName Then
If Forms(intX).CurrentView conFormDesign Then
IsFormLoaded= True
Exit Function ' Quit function once form has been found.
End If
End If
Next
End Function
来源:http://www.tulaoshi.com/n/20160219/1615389.html
看过《判断窗体是否打开地两种办法》的人还看了以下文章 更多>>