drlector
07-30-2003, 02:13 PM
hi
i have tried many code to make avi's play in my program but all of them seem to open its own box to play it in .
is it possible to make the avi play within the form i have created
please help
dragnut
07-30-2003, 02:56 PM
Add a microsoft multimedia control and a picturebox to a form, and paste the following in the forms module...
Private Sub Form_Load()
MMControl1.FileName = "c:\avifilename.avi" 'path of the avi file
MMControl1.hWndDisplay = Picture1.hWnd
MMControl1.Command = "open"
End Sub
Private Sub Form_Unload(Cancel As Integer)
MMControl1.Command = "stop"
MMControl1.Command = "close"
End Sub
Shawn
drlector
07-30-2003, 04:42 PM
cheers dragnut
just what i wanted
btw: how would i go about making it play automaticaly
is it possible
VBCODEX
07-30-2003, 04:47 PM
'try adding this on the forms load event
MMControl1.Command = "play"
drlector
07-30-2003, 04:52 PM
cheers vbcodex
perfect...............
btw:when i run my avi i get no sound and also it seems like it may be running to fast.
any idea's
cheers
Cool! I tried it. If you could answer me 3 questions it will be of great help. (Or anyone who can)
1.) How can I capture snapshots of the video? (is there a property of getting the pictures / frames presented on the picture1 control?
2.) How can I record the avi into another file (including audio) ?
3.) Can the source of the video not be a file but a wdm source?