[Gambas-user] Check if a form is opened/show
Fabien Bodard
gambas.fr at ...626...
Sat Aug 11 13:47:10 CEST 2012
Or simply:
If FMain then
If fmain is not used then it is not instanciate so its value must be
null... I think...
Another way can be to add a static value to fmain
'in fmain
Static Private $iCnt as integer
Property Read IsOpened as boolean
PUblic sub _New()
inc $iCnt
endif
Public sub Form_Close()
dec $iCnt
end
Static Public Function IsOpened_Read() as Boolean
Return $iCnt >0
end
'so in form 2 you can call :
if FMain.IsOpened then ...
More information about the User
mailing list