Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining the active form.....
Message
 
 
To
15/07/1998 13:25:45
Larry Santos
Local Data System
Philippines
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00117679
Message ID:
00117702
Views:
15
Larry,

For my single instance forms, the menu item has a Skip Form clause of FormRunning( "frmTheFormName" )

the FormRunning udf just loops through the _screen.Forms collection and returns .t. if it finds it.
* FormRunning.PRG 08-Mar-98

* determine if a particular form is running. 

* It checks the Name property

lparameter pcFormName

local i, llRetVal

llRetVal = .f.
pcFormName = upper( pcFormName )

for i = 1 to _screen.FormCount
   if ( upper( _screen.Forms[i].Name ) == pcFormName )
      llRetVal = .t.
      exit
   endif
endfor

return llRetVal
>Hi,
>
> This is my last question for this topic.
>
> Could you please tell me the exact code for:
>
>
> 1. I check for a form if they already active.
> 2. if the form is not active I use do form "myform"
> 3. if its already active I want to activate it instead of do form "myform"
>
>Thanks
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform