Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp RIP ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01201291
Message ID:
01202278
Vues:
17
Hi Paul, MessageBox and CreateObject! are not implemented in the runtime. Belows is the code adapted for the current functionality, note that I inheriting from System::Object because the online compiler has not definition of Custom (a VFP Class).

Note that your code is the same, I'm providing a Quick and Dirty implementation of MessageBox.

This compiles ok with the compiler but fails to resolve System::windows::forms, because the online compiler does not references the assembly System.windows.forms.dll
o = CusTest()
o.Init()
o.Destroy()
o = .F.

FUNCTION MessageBox
LPARAMETERS cMessage, nButton, cCaption
TLOCAL nButtons as System::windows::Forms::MessageBoxButtons
nButtons = 1
System::Windows::Forms::MESSAGEBOX::Show(cMessage as System::String,cCaption as System::String,nButtons)

FUNCTION MessageBox
LPARAMETERS cMessage as System::String, nButtons as Integer
=MESSAGEBOX(cMessage,"",nButtons)


DEFINE CLASS cusTest
   cInitMessage = "Test Init"
   cDestroyMessage = "Test Destroy"

   FUNCTION Init()
     MESSAGEBOX(This.cInitMessage, 64 + 4, "Test")     
   ENDFUNC

   FUNCTION Destroy()
     MESSAGEBOX(This.cDestroyMessage, 64, "Test")
   ENDFUNC
ENDDEFINE
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform