明輝手游網(wǎng):m.79things.com

本站App下載  |  

首頁 > 電腦資訊 > 電腦知識

判斷窗體是否打開的二種辦法

作者:佚名   來源:本站   時(shí)間:2018-07-11  點(diǎn)擊:105次

Function IsLoaded(strName As String, Optional intObjectType As Integer =
   acForm)
   IsLoaded = (SysCmd(acSysCmdGetObjectState, intObjectType, strName) <> 0)
   End Function
   
   函數(shù)二
   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
 

推薦游戲

換一換