Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: llyrad atsituab
  Where is llyrad atsituab?
 Tacloban City
 Philippines
 llyrad atsituab
 To: Zul Rahim
  Where is Zul Rahim?
 Houston
 Texas - United States
 Zul Rahim
 Tags
Subject: RE: Form of Form
Thread ID: 331108 Message ID: 331113 # Views: 39 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Tuesday, December 27, 2011 5:06:04 AM         
   


> > Hi experts..
> >
> > I have 2 forms... form 1 and form 2.. if my form 1 is visible and I will try to open it again it will prompt a message 'the form is already open'.. how will I able to do this.. please guide me.. thanks in advance.. merry christmans to all..
>
>
> You could use a formsManager class. If you've only 2 forms, and if you have unique name (name property of the form) for each form you could do the following before calling the form:
>
>
>
> *-- See if Form1 is running to prevent a 2nd instance of the form.
> llFormIsRunning = .F.
> FOR Each loForm in _Screen.Forms FoxObject
>      If Upper(loForm.Name) == "FORM1"
>           llFormIsRunning = .T.
>           EXIT
>      Endif
> Endfor
> 
> If NOT llFormIsRunning
>    Do form Form1...
> Endif
> 
> *-- Do the same for the 2nd Form before opening it.
> 

>
>
> Zul Rahim
> VIVA LA FOX

thanks for the reply...Sir can you attach some example of forms of this code that you've shared with me..

what I mean is an attachment..

ENTIRE THREAD

Form of Form Posted by llyrad atsituab @ 12/27/2011 3:41:19 AM
RE: Form of Form Posted by Zul Rahim @ 12/27/2011 4:57:07 AM
RE: Form of Form Posted by llyrad atsituab @ 12/27/2011 5:06:04 AM
RE: Form of Form Posted by Jun Tangunan @ 12/27/2011 6:44:43 AM
RE: Form of Form Posted by llyrad atsituab @ 12/27/2011 6:49:58 AM
RE: Form of Form Posted by Jun Tangunan @ 12/27/2011 6:59:39 AM
RE: Form of Form Posted by Tom Saddul @ 12/27/2011 7:21:41 AM