Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to add object from define class?
Message
De
04/08/2003 04:51:43
 
 
À
03/08/2003 22:48:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00816367
Message ID:
00816391
Vues:
18
Hey Canh,

Use NewObject instead of AddObject:
thisform.NewObject(<<objectname>>, 'oleExcelObject', <<path and filename of .prg>>)
Aloha,

James
>Hi everybody!
>When I run a form and I would like add an object from the class that is defined programmatically with codes following:
>
>DEFINE CLASS oleExcelObject as OLEControl
> OleClass ="Excel.Sheet" && Server name
> DocumentFile = "test.xls" && This file must exist
>ENDDEFINE
>thisform.AddObject("Excel", "oleExcelObject ")
>
>
>I set these codes in init method or another method , I get an error.
>How to add object from define class when the form runtime?
>Please help me.
>Thanks
>Canh
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform