Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form flashed and disappered
Message
De
29/07/2002 14:17:20
Irv Adams
MSC Managed Care, Inc.
Floride, États-Unis
 
 
À
29/07/2002 06:44:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00682995
Message ID:
00683644
Vues:
32
>>
You should also ensure that form's name property is the same with the SCX filename that stores the form. You can also create a public variable with the same name on the forms load, and assign form's refference to it, if you wish to have only one instance of the form, but not modal. Add this code to your form's Load event in this case:

Local lcThisFormName
lcThisFormName = ThisForm.Name
Public &lcThisFormName
&lcThisFormName = ThisForm
>>


Zlatin...this sounds interesting...could you explain this some more? Are you saying I could class a Form that would automatically prevent anyone from instantiating it twice if it's already Open and even though it's not Modal?

Thanks,

-Irv.



>>You're absolutely right, Marcia; READ EVENTS is sufficient. The problem must have another cause...
>>
>>-Irv.
>>
>>>Hello Irv.
>>>
>>>The variable used to 'Link' with the form must have PUBLIC scope either through declaration or association with a Global App Object, etc. The variable goes out of scope and takes the Form with it.
>>>
>>>I'm sorry, but you are mistaken here. Because the READ EVENTS command is issued immediately after the DO FORM, the variable should stay in scope and the form should still be there.
>
>Except this:
>Your form is not modal and you do not have read events at the end of your main PRG.
>Add the following lines to your main.prg:
>
>ON SHUTDOWN CLEAR EVENTS
>READ EVENTS
>ON SHUTDOWN
>
>
>You should also ensure that form's name property is the same with the SCX filename that stores the form. You can also create a public variable with the same name on the forms load, and assign form's refference to it, if you wish to have only one instance of the form, but not modal. Add this code to your form's Load event in this case:
>
>Local lcThisFormName
>lcThisFormName = ThisForm.Name
>Public &lcThisFormName
>&lcThisFormName = ThisForm
>
>
>HTH
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform