Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Testing an open form
Message
 
To
06/09/2002 11:39:13
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00697561
Message ID:
00697568
Views:
25
This message has been marked as the solution to the initial question of the thread.
Hi Nerissa,

>Is there a function that tests whether a form is open or not?

the most generic way would be to scan the _SCREEN.Forms collection and compare the names of the forms with the name you're looking for:
LOCAL loFoundForm, loForm
loFoundForm = .NULL.

FOR EACH loFORM IN _SCREEN.Forms
  IF UPPER(loForm.Name) == "MYFORMNAME"
     loFoundForm = loForm
     EXIT
  ENDIF
ENDFOR

IF NOT ISNULL(loFoundForm)
  *-- loFoundForm contains a reference to the found form
ENDIF
In MM you can also ask the MM Forms Collection:
loFoundForm = goApp.oForms.Get("MYFORMNAME")
IF NOT ISNULL(loFoundForm)
  *--
ENDIF
HTH,
Armin

Armin Neudert
Regional Director (Stuttgart) of German FoxPro User Group dFPUG

MCP for Visual FoxPro

Expert/Editor of the VFP section in the German Codezone community portal
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform