what component can i use for Video on form load???
Printable View
what component can i use for Video on form load???
Hmm, lots of them in no particular order
1) MMControl (MS Multimedia Control)
2) Windows Media Player
3) MCI Api - not really a control, just api code
4) ActiveMovie - see code below
Note: only tested on .mpg & .mpeg files
Code:Option Explicit
'ref to ActiveMovie control type library
' (quartz.dll)
Private Player As QuartzTypeLib.FilgraphManager
Private Sub Form_Load()
Set Player = New FilgraphManager
'**********change the file path below***********
Player.RenderFile "C:\MyDocs\Videos\Beatles - You're Gonna Lose That Girl.mpg"
Player.Run
End Sub
Private Sub Form_Unload(Cancel As Integer)
Player.Stop
Set Player = Nothing
End Sub
No, as I said in my post, set a reference (Project|References) to the ActiveMovie control type library.
If it doesn't appear in the list, browse to your system folder & select quartz.dll.
There is a control in the toolbox called MS ActiveMovie but it is actually Windows Media Player
(msdxm.ocx), not to be confused with the other Windows Media Player (wmp.dll).