判断窗体是否打开的两种方法 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