我想在C#中运行非常简单的videoplayer windows表单应用程序,但是当我点击按钮播放视频时,我收到此错误:
"An unhandled exception of type 'System.IO.FileLoadException' occurred in System.Windows.Forms.dll"
Form1.cs:
using Microsoft.DirectX.AudioVideoPlayback;
namespace videoplayer
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Video myVid = new Video("d:\\vids.avi");
myVid.Owner = panel1;
myVid.Play();
}
}
}
异常错误请参考Program.cs:
namespace videoplayer
{
static class Program
{
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1()); //exception error here
}
}
}
由于