Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Communicating between forms
Message
 
 
À
05/10/1998 11:28:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00143896
Message ID:
00143907
Vues:
35
>>>>I have a situation where instead of one large form, I'd like to have a bunch of smaller forms on the screen at once. This would allow the user to move them around or minimize them individually. All these forms are related to each other, so when the user does something on one form, it needs to affect the other forms.
>>>>
>>>>How do I refer to the controls on one form from another form? I'd also like them to use the same datasession. Basically, I want the control of one large form, but broken into smaller windows.
>>>>
>>>>Any ideas?
>>>>
>>>>-Michelle
>>>
>>>You should take care of app hierarchy. When you open a form you provide link to some external (e.g. app object property):
>>>DO FORM myform1 NAME oApp.myform1 LINKED
>>>Now you can refer to this form's controls from any point of you application:
>>>oApp.Myform1.Control1.Property1=...
>>>If you set your forms to use default datasession they all will share the same one.
>>
>>How do I make the oApp?
>>
>>Thanks,
>>
>>-Michelle
>
>The simplest oApp can be created in Main.Prg (first module of your app):
>oApp=createobject("clApp")
>do mainform
>read events
>return
>
>Define Class clApp as Custom
>.myform1=.Null.
>.myform2=.Null.
>...
>EndDefine

Ok, thanks!

-Michelle
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform