General information
Category:
ActiveX controls in VFP
If you run the Visual FoxPro solutions sample and from the navigation tree select:
ActiveX Controls->Play An AVI File In An ActiveX Control
You will presented with an example that plays a Microsoft AVI video file. The primary purpose of the control is to provide a window in which images, icons, and metafiles can be displayed thus providing more functionality than the standard VFP image class.
1. Create a new form
2. Drop the HWND ActiveX on the form and set the name property to oleHWND
3. Drop a button on the form and add the following code to the click() event.
LOCAL lcFilename
lcFilename = getfile("ICO")
if NOT empty(lcFilename)
ThisForm.oleHWND.picture = loadpicture(lcFilename)
wait window "Press a key to save the display."
ThisForm.oleHWND.SaveDisplay()
endif
4. In the paint() event of the oleHWND control add the following code.
ThisForm.oleHWND.RestoreDisplay()
Previous
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