我从COM组件中添加了VLC插件,拖到了我的表单上,为表单添加了两个按钮("播放"和"停止"),然后编写了以下代码:
private void Form1_Load(object sender, EventArgs e)
{
axVLC.AutoPlay = false;
axVLC.playlist.add(@"C:\Users\Hanif\Documents\Visual Studio 2010\Projects\Education Visualization\Vlc\Resources\Video1.wmv");
}
private void btnPlay_Click(object sender, EventArgs e)
{
axVLC.playlist.play();
}
private void btnStop_Click(object sender, EventArgs e)
{
axVLC.playlist.stop();
}
但是当我点击“播放”时,什么也没发生。我做错了什么吗?