Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to return a value from a form?
Message
De
28/11/2003 06:36:46
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00854035
Message ID:
00854162
Vues:
21
>Hi Cetin,
>
>That's good to know! I faced this once and I ended creating a form based on my class to use the DO FORM withouth looking further into this.
>
>This behaviour of the Modal state is logic if you think about it, when hidden the modal state is no more. However, it is not very well documented in the Help files. The only thing that can help you in discovering this is the description of the nStyle parameters of the Show method.
>
>Regards,
>Sylvain

You're right :) According to documentation you're directed towards modal form's unload event to get back a value. I first discovered the hide() workaround when unintentionally I had trouble releasing a form. Since than I'm using it to get my value(s) back too :) So now I don't care if it's a createobject() one or do form .. name oFrm one. In both cases I hide() rather than releasing it, get my values directly from properties (even don't preserve extra form properties like date ranges, login name etc) then release it using the reference on hand. ie:

oFrm = createobject('myForm')
oFrm.Show(1) && I might want to use a modeless as modal
ldStart = oFrm.txtStartDate.Value && Code continues here when form.hide()s
oFrm.release()
release oFrm

do form myForm name oFrm linked && Call a modal form
ldStart = oFrm.txtStartDate.Value && Code continues here when form.hide()s
oFrm.release()
release oFrm

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