Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to AddObject Ole-objects to a form at runtime?
Message
From
18/05/2005 05:58:54
Evert Meulenkamp
Meulenkamp Automatisering
Hengelo Ov, Netherlands
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
How to AddObject Ole-objects to a form at runtime?
Environment versions
Visual FoxPro:
VFP 6 SP3
OS:
Windows '98
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01015240
Message ID:
01015240
Views:
80
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
Map
View

Click here to load this message in the networking platform