Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Tell existence of an open form?
Message
De
31/07/2001 03:44:08
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
30/07/2001 23:07:49
Peter Brama
West Pointe Enterprises
Detroit, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00537591
Message ID:
00537630
Vues:
10
>I have created a form to be a status box... I need to tell if that form, which was opened with....
>
>do form myform name myform
>
>is currently open or not prior to writing updates to it. Wexist() doesn't cut it. I found that out the hard way when I accidentally opened over 300 instances of the form before my computer said - 'YEAH RIGHT!!!'
>
>Help!!!!

Peter,
With name clause if 'myform' is in scope you could test it as if you would do for any object.
OTOH for this specific purpose you could do :
do form myform
* and check with
if type('myform')='O' ;
  and !isnull(myform) ;
  and myform.baseclass = 'Form'
This relies on the fact that a form instantiated with 'do form' could be referenced by its .scx name (only for the first instance).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform