Information générale
Catégorie:
COM/DCOM et OLE Automation
Titre:
How to AddObject Ole-objects to a form at runtime?
Versions des environnements
Hello,
My goal is to show different pictures in the original application they were made in, after the user clicks on a button on my form.
The next code does not work because the property "DocumentFile" is protected. I try to set it in the Init() of olePict, a subclass of the baseclass OleObject, to avoid the user-dialog to select a document on creation of the object.
Does anyone have a suggestion on how to do this, or is there a better way to show pictures in their original applications on VFP6 (Windows 98) (WITHOUT using General fields).
LOCAL lcPicture
lcPicture = v_pic.pictname && Get name and location of picture from memofield
THISFORM.AddObject("olePict1","olePict","&lcPicture")
THISFORM.olePict1.Doverb(0)
Thanks for any suggestions!
Evert.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement