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


> 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.

Sorry, I was dumb. Please try it again with the following code:
FOR EACH loForm IN _screen.forms
   IF loForm.name = thisform.name and loForm.visible
      * form already loaded
      messagebox("already loaded")
	  RETURN .F.
   ENDIF
ENDFOR

--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts

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