First, i'm sorry for my (poor) english.
The solution is to create a dynamic VLC control.
Create a new projet with a form (called frmVlcTest) and a module with the Main procedure.
It is unnecessary to add the VLC Plugin reference.
Here is the code :
Code: Select all
Sub Main()
Dim oVlc As VBControlExtender
Dim fIniTimer As Single
Load frmVlcTest
frmVlcTest.ScaleMode = vbPixels
frmVlcTest.Show
Set oVlc = frmVlcTest.Controls.Add("VideoLAN.VLCPlugin", "ctrlVlc", frmVlcTest)
oVlc.Move 100, 100, 400, 300
oVlc2.Visible = True
oVlc.object.playlist.Add "path_to_media_file"
oVlc.object.playlist.play
fIniTimer = Timer
Do
DoEvents
Loop Until Timer - fIniTimer > 3
oVlc.object.playlist.stop
DoEvents ' very important unless the exe program or the vb interface crashes
Set oVlc = Nothing
frmVlcTest.Controls.Remove "ctrlVlc" ' very important unless the exe program crashes
Unload frmVlcTest
End
End Sub
I have not explored all possibilities but it is a good start.
![Wink :wink:](./images/smilies/icon_wink.gif)