Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling a form as a function
Message
De
05/12/1997 13:23:17
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00064057
Message ID:
00064070
Vues:
32
>I have a VFP form that I would like to have return a value. I know that I can put RETURN (value) in the Unload event of the form, but what is the form calling syntax? With old .SPRs I just created a .PRG and called it like so:
>
>IF MyDialog() = 1
>   ...
>ENDIF
>
>
>How do I do this with a VFP form?
>
>TIA
Hi,
Normally you use :
Do form with to

If you need more than one return value than you would use an array as .
This requires your CalledForm be modal.

Another approach is :
Create one or more properties (or array) on calling form and call the other with :
Do form with

In the called form since you have a reference to CallingForm you can set properties of caller in many levels.
(This approach is like using Toolbars - You can change properties on Caller before return and interfere with it anyway you like).
If will use modeless than add the name parameter to be able to control CalledForm as well (ie: user clicks over Calling and you want the other be refreshed as well).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform