I have VLC Player in Ubuntu and I install Visual Basic 6 using Wine. Now I want to add VLC Player or any media player to VB6 but I don't know how to do it. Could you please help me to solve these problem?
Asked
Active
Viewed 706 times
-3
-
1You are using an 18 year old language on an unsupported OS. Wow, what could possibly go wrong? – Jeroen Apr 15 '16 at 05:45
1 Answers
-1
There are two ways to use new stuff in legacy VB6:
Stand Alone VB6
Use VB6 WebBrowser control. That control will load the system ie that can load VLC as a plugins.
.Net embedded control.
Create a Windows form .net control that embeds vlc, and compile it with interop.
But I don't think that'll work with wine, because:
1) Wine uses gecko as browser.
2) Visual Studio .Net doesn't work on wine
I'm no wine expert, but there should be some sort of windows native video playing api, that's been implemented as an ffmpeg wrapper.
EDIT: Current gecko browser supports html5 video. VLC is not required.
Option Explicit
Private WithEvents m_oDocument As MSHTML.HTMLDocument
Private Sub Form_Load()
Call Me.WebBrowser1.navigate("about:blank")
Set m_oDocument = Me.WebBrowser1.document
m_oDocument.Open
Me.WebBrowser1.document.Write "<!DOCTYPE html> <html><head><meta http-equiv='X-UA-Compatible' content='IE=Edge'></meta></head><body><video width='400' controls><source src='mov_bbb.mp4' type='http://www.w3schools.com/html/mov_bbb.mp4'><source src='http://www.w3schools.com/html/mov_bbb.ogg' type='video/ogg'>Your browser does not support HTML5 video.</video></body></html>"
m_oDocument.Close
End Sub