Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Return value from Object
Message
De
27/12/2004 14:46:37
 
 
À
27/12/2004 13:52:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00972408
Message ID:
00972421
Vues:
11
>How can i obtain the return value from this objet?
>
>*** The object is a MODAL Form
>*** On the method UNLOAD i have this Code
>*** RETURN 150
>
>LOCAL oObj
>oObj=CREATEOBJECT("frmTeste",1,"")
>oObj.Show
>
>?oObj.??????????????
>
>[]'s

You can do this with a trick:
WITH NEWOBJECT('myModal')
          .show
 getCode= .returnCode
ENDWITH
?  m.getCode

DEFINE CLASS myModal as Form
   WindowType = 1
   returnCode = .NULL.
   
   PROCEDURE QueryUnload
     this.returnCode = 150
     
   PROCEDURE Release
       NODEFAULT 
       * Name must to be unique
       RELEASE WINDOWS (m.this.Name)
       * or you can use API 
       * PostMessage(m.this.hwnd,16,0,0)
       
ENDDEFINE 
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform