General information
Category:
COM/DCOM and OLE Automation
Title:
How to AddObject Ole-objects to a form at runtime?
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.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only