Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modeless form disappears due to scope
Message
 
 
À
10/10/2011 11:20:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01525979
Message ID:
01525980
Vues:
96
This message has been marked as the solution to the initial question of the thread.
>I have a question about how to keep a modeless form around after the variable it was created with loses scope.
>
>My code looks something like this:
loForm = Newobject('SomeFormClass', 'SomeLib.VCX')
>loForm.SomeProperty = .T.
>loForm.Show()
>Since the form is modeless, when the method which creates it completes, loForm goes out of scope, and my form closes. (I see it flash briefly).
>
>What's the normal way to code this so that the form hangs around?
>
>Oh, two more things
>
>(1) This method may be called more than once, so there may be multiple instances of the form running.
>(2) This is not part of an application, but runs in the IDE, so I can't have a forms manager around to do this for me.
>
>Thanks in advance,
>
>
>Jim

You can add a reference to the form to _screen which will be used as 'Form Manager'
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform