Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Khalil Shaddad
  Where is Khalil Shaddad?
 Beirut
 Lebanon
 Khalil Shaddad
 To: Eric den Doop
  Where is Eric den Doop?
 Houten
 Netherlands
 Eric den Doop
 Tags
Subject: RE: Preventing a form from running twice.
Thread ID: 22346 Message ID: 22350 # Views: 20 # Ratings: 0
Version: Visual FoxPro 7 Category: Forms
Date: Wednesday, April 16, 2003 11:54:30 AM         
   


> Two thoughts:
>
> ACTIVATE WINDOW (lcWindName)
>
> Or use the OOP approach:
>
> FOR EACH loForm IN _screen.forms
> 	IF loForm.name = "yourname"
> 		* form already loaded
> 		loForm.show && or loForm.activate
> 	ENDIF
> ENDFOR
> 

> --
> Eric den Doop
> www.foxite.com - The Home Of The Visual FoxPro Experts
Thanks for your reply.
first suggestion works if form is not minimized. My problem comes when the form is minimized.
second option: Replacing "yourname" with Thisform.Name will never let the form to start even for the first time. i.e. IF loForm.name = Thisform.Name will return always TRUE.

Khalil Shaddad (Lebanon)

COMPLETE THREAD

Preventing a form from running twice. Posted by Khalil Shaddad @ 4/16/2003 8:52:13 AM
RE: Preventing a form from running twice. Posted by Eric den Doop @ 4/16/2003 9:49:15 AM
RE: Preventing a form from running twice. Posted by Khalil Shaddad @ 4/16/2003 11:54:30 AM
RE: Preventing a form from running twice. Posted by Eric den Doop @ 4/16/2003 12:13:45 PM
Thanks. That was it. Posted by Khalil Shaddad @ 4/16/2003 12:59:53 PM