Page 1 of 1

vlc activeX with c#

Posted: 19 Jan 2009 16:53
by sdecorme
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

Re: vlc activeX with c#

Posted: 19 Jan 2009 17:09
by sdecorme
I think my problem from the declaration of my object on my form
the vlcPlayer object is declared like this :

using AxAXVLC;
using AXVLC;
...
private AxVLCPlugin vlcPlayer = new AxVLCPlugin();

but my object on the form is called VLC
I don't know how the make a link between my object on the form and vlcPlayer

thanks

Re: vlc activeX with c#

Posted: 19 Jan 2009 20:08
by Beardless2
not sure if this will solve it for you, but use v2 of the plugin, v1 is deprecated

Something like private AxVLCPlugin2 vlcPlayer = new AxVLCPlugin2();

Re: vlc activeX with c#

Posted: 27 Sep 2009 07:12
by rarao
Can someone let me know how to use the VLC activeX in C# application?

What dlls are required? i have axvlc.dll but i am not seeing the AxAXVLC.dll anywhere?

regards
Rao

Re: vlc activeX with c#

Posted: 07 Dec 2009 13:16
by seblh