Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to bring a form to front
Message
De
23/02/1998 09:20:46
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00080198
Message ID:
00080424
Vues:
33
>Ed, it seems that VFP uses the Name property of the form as the form's VFP window name, so that if you know the Name property of the form (lets says it's called frmMyForm), you can say:
>Activate Window frmMyForm Top
>Zoom Window frmMyForm NORM
>
>So what, you say? This is a segway to asking for your advice on the issue of never-use-a-window-name to refer to a form object. For example, I have found that if I have a modeless form sitting around out there, and based on some event that is NOT related to that form (i.e., there is no ThisForm reference), I then need to close that form, I have found it very convenient to say:
>Release Window frmMyForm
>...rather than iterating through _screen.forms(x) just to find the form (or forms) that I need to close.
>
>Is this blasphemy? Thanks.
>

Using old-style 'Window windowname' construction is a last straw, i.e. it should be used when OO reference cannot be used for some reason, e.g. if you handle VFP standard toolbars. In other situations, if OO refs are available they should be used as first choice. I agree that this is pain to check _screen.forms() any time you want to refer to a form, therefore I like formsets.
Edward Pikman
Independent Consultant
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform