vlc activeX with c#
Posted: 19 Jan 2009 16:53
I'm trying to build a simple video viewer with a button to load a video file.
I had the dll as reference in my project (AxAXVLC & AXVLC)
I had the component to my form
I had a button and I put this code
void OpenVideo()
{
openFileDialog2.InitialDirectory = "C:\\"; // Application.StartupPath;
if (openFileDialog2.ShowDialog() == DialogResult.OK)
{
string NomFilm = openFileDialog2.FileName;
vlcPlayer.addTarget(NomFilm,null, AXVLC.VLCPlaylistMode.VLCPlayListAppend,0);
vlcPlayer.play();
}
}
Why it doesn't work it give me this error
Error displaying player : exception type 'system.widows.axhost+invalidActiveXStateException'
Any ideas?
Thanks
I had the dll as reference in my project (AxAXVLC & AXVLC)
I had the component to my form
I had a button and I put this code
void OpenVideo()
{
openFileDialog2.InitialDirectory = "C:\\"; // Application.StartupPath;
if (openFileDialog2.ShowDialog() == DialogResult.OK)
{
string NomFilm = openFileDialog2.FileName;
vlcPlayer.addTarget(NomFilm,null, AXVLC.VLCPlaylistMode.VLCPlayListAppend,0);
vlcPlayer.play();
}
}
Why it doesn't work it give me this error
Error displaying player : exception type 'system.widows.axhost+invalidActiveXStateException'
Any ideas?
Thanks