在 vb.net 中嵌入 vlc 播放器
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21772502/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Embedding vlc player in vb.net
提问by Mayur Patil_user3095544
How to integrate vlc player in vb.net? Can anybody help me ? I am using visual studio 2008. In my project i was using Windows media player before,but because of some problems occured in project.I wanted to switc my video player to vlc player..
如何在 vb.net 中集成 vlc 播放器?有谁能够帮助我 ?我使用的是 Visual Studio 2008。在我的项目中,我之前使用的是 Windows 媒体播放器,但由于项目中出现了一些问题。我想将我的视频播放器切换到 vlc 播放器。
My pc configuration:- 1)64 bit 2)Windows 8 pro 9200
我的电脑配置:- 1)64 位 2)Windows 8 pro 9200
Hoping that someone will help me.
希望有人会帮助我。
My email Id - [email protected]
我的电子邮件 ID - [email protected]
AxWindowsMediaPlayer1.Ctlcontrols.currentPosition=reader.getString(5) AxWindowsMediaPlayer1.Ctlcontrols.play()
AxWindowsMediaPlayer1.Ctlcontrols.currentPosition=reader.getString(5) AxWindowsMediaPlayer1.Ctlcontrols.play()
Above code i have used for windows media player, I am searching for foe alternative for same code wic relates to vlc player.
上面的代码我用于 windows 媒体播放器,我正在寻找与 vlc 播放器相关的相同代码的敌人替代品。
回答by Hoh
Download the latest version of VLC, i'm sure it will work anyway, but just to have the same setup as me.
下载最新版本的 VLC,我相信它无论如何都能工作,但只是为了和我有相同的设置。
Add the VLC ActiveXas a component to the VB5 /6 project, it will put 2 traffic cones into the toolbox, called VLCPLuginand VLCPlugin2.
VLC ActiveX作为组件添加到VB5/6项目中,它将把2个交通锥放入工具箱中,称为VLCPLugin和VLCPlugin2。
Place a new VLCPlugin control on your form and size it suitably, and add the following code to a button or the form load:
在您的表单上放置一个新的 VLCPlugin 控件并适当调整其大小,然后将以下代码添加到按钮或表单加载中:
VLCPlugin1.addTarget "c:\winvideo\sample.avi", Null, VLCPlayListInsert, -666
VLCPlugin1.play
If you turn on autoplay, or use a vlc play list option with the word "go" in it, it will play the clip automatically.
如果您打开自动播放,或使用带有“go”字样的 vlc 播放列表选项,它将自动播放剪辑。
You can use the fullscreen option to put it into fullscreen mode.
您可以使用全屏选项将其置于全屏模式。

