Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding an OLE container object to a form
Message
De
06/10/1999 19:17:31
 
 
À
06/10/1999 14:57:32
Becky Vidal
Heritage Information Systems, Inc.
Richmond, Virginie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00273310
Message ID:
00273458
Vues:
34
>Dan,
>
>I am not sure what you mean. The code to Add the object to the form is is the forms init event. When it talks about passing the parameters to the INIT event, which object's INIT method is it talking about? the form or the new object.
>
>Also, what is AFAIK?
>
>Thanks
>Becky

Ok, here's the solution I've come up with. It's a kludge but unfortunately the OleControl is very picky about when you can assign the file name. In your form you can call the code below in a prg and just pass it the file name. You may want to release oForm again when you close the form.

HTH
#DEFINE knEdit        -2

PARAMETERS pcFile
RELEASE oForm
PUBLIC oForm

oForm = createobject( "Form")
oForm.AddObject( "oleObject", "oleExcel" )

oForm.OleObject.DoVerb( knEdit )

DEFINE CLASS oleExcel as OleControl
	OleClass = "Excel.Sheet"
	DocumentFile = pcFile
ENDDEFINE
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform