Information générale
Catégorie:
Contrôles ActiveX en 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()
Précédent
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