开发环境:
Visual Studio 2015
.Net Framework 4.5
1.新建一个Windows窗体应用程序
修改框架为.Net Framework 4.5
2.管理NuGet包
下载安装5个包
VideoLAN.LibVLC.Windows
Vlc.DotNet.Core
Vlc.DotNet.Core.Interops
Vlc.DotNet.Forms
Vlc.DotNet.Wpf
3.添加VlcControl
工具箱添加VlcControl,dll位于当前项目中
将VlcControl添加到窗体上
在VlcControl的VlcLibDirectoryNeeded事件中添加如下代码(必须)
///
///Looks for the vlc directory on the opening of the app///Opens a dialog if the libvlc folder is not found for the user to pick the good one///Folder for 32bits should be "libvlc\win-x86\" and "libvlc\win-x64\" for 64 bits///