Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Release a TOp Level Form through attached Menu
Message
 
À
18/05/1999 12:06:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00220066
Message ID:
00220211
Vues:
26
>I Have a top level form and a menu is attached with it.
>The last pad of this menu is EXIT , now i want to relese the
>form through This pad selection,
>I have placed the Thisform.Release code in pad command
>but on selecting the pad a error message is generated
>that "Thisform" can be used only in form methord.
>
>Looking for quick solution.

THISFORM only works from within a class. Menu's aren't classes, so this doesn't work. What you need is some other reference to the form. Maybe _Vfp.ActiveForm will work. In this case you can simply do a
_VFP.ActiveForm.Release()
This really depends on how you instantiate your form. Let's say you instantiate it like so:
DO FORM MyForm NAME oMainForm
You can now release the form from the menu like so:
oMainForm.Release()
Markus




Markus Egger
President, EPS Software Corp
Author, Advanced Object Oriented Programming with VFP6
Publisher, CoDe Magazine
Microsoft MVP since 1995
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform