General information
Category:
Forms & Form designer
One thing I recommend is to instantiate your forms with different names (set in the name property... even if you multi-instance the same modeless form).
You can use the following snippet to get at the form you want based on its name property (which is also its window name as used by the WExist() function).
Function ReturnFormRef(cWindowName)
Priv frm
for each frm in _Screen.Forms
if upper(cWindowName) == Upper(Trim(frm.name))
Return frm
Endif
Endfor
Return .F.
Note that by using FOR EACH to get a reference to each form, you can sniff (or modify) the properties of each form as you iterate through them, thus enabling you to use properties of your forms to determine if a given form is of interest to you.
>I'm trying to detect if a toplevel, modeless form is running. I'm trying something like:
>
> if type("test_form.width") = "U" &&it will be "U" if form isn't running
> do form test_form
> endif
>
> The type is always "U", even when the form is running. I have considered using amembers(...), but if the form isn't running, amembers(...) throws an error.
>
>
> Anyone have any other ideas/corrections? Thanks in advance.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only