How do you tell if a form is being displayed? (OpenInsight Specific)
At 11 FEB 1999 06:26:45PM Tara wrote:
This should be any easy one. How do you tell if a form is currently being displayed? I just haven't been able to find a function or property for it. I want a procedure that will test if a form is up. If not it will open the form.
Thanks,
Tara
At 11 FEB 1999 06:50PM Greg James, ISIS, Inc. wrote:
You could:
Handle=Get_Property(SomeFormName,'HANDLE')
If Len(Handle) Then
VisibleStatus=Get_Property(SomeFormName,'VISIBLE')
do some processing here – if VisibleStatus NE 0 then it is displayed End Else Error Msg
End
At 11 FEB 1999 10:49PM dsig@teleport.com wrote:
Tara,
Here is some sample code we used on a MDI parent to see what forms are open .. this might help you.
This code is in a click event for a button "Windows Available"
Declare Function Get_Property
Declare Function Msg
Declare Function Utility
Declare Function Popup
$Insert Popup_Equates
$Insert Ctrl_Property_Equates
Equ Null$ to ""
parentid=Get_Property(ctrlentid,"PARENT")
ObjList=Utility("OBJECTLIST","","WINDOW")
Convert @Fm to @Vm in ObjList
DisplayData=Null$
WinCnt=Count(ObjList,@Vm) + (ObjList # Null$)
For Pntr=1 to WinCnt
WinId=ObjListDisplayData := @Vm : Get_Property(WinId,Text$)Next Pntr
DisplayData1,1=Null$
/*
"SSOFT_AVAILABLE_WINDOWS" is a popup I created which is used for literal data. Here we read in the popup and use it to build a popup. We could have just stuffed the display data stuff with the data but there was something in the original popup I didn't want to have in this display ..
*/
PopRec=Xlate("SYSREPOSPOPUPS","SSOFT**SSOFT_AVAILABLE_WINDOWS","","X")
PopHeading=PopRec
DisplayFormat=PopRec
TypeOverride ="
TypeOverride=L'
TypeOverride=P'
TypeOverride = DisplayFormat
TypeOverride=DisplayData
TypeOverride = PopHeading
TypeOverride=1
RetVal=Popup( ParentId, TypeOverride )
If RetVal # Null$ Then
x=Set_Property(ParentId,"MDIACTIVE",ObjList)End
dsig@teleport.com onmouseover=window.status=you have seen the rest .. now try the best!;return(true)"
David Tod Sigafoos ~ SigSolutions
voice: 503-639-8080