vlc activeX with c#

This forum is about all development around libVLC.
sdecorme
New Cone
New Cone
Posts: 3
Joined: 16 Jan 2009 15:33

vlc activeX with c#

Postby sdecorme » 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

sdecorme
New Cone
New Cone
Posts: 3
Joined: 16 Jan 2009 15:33

Re: vlc activeX with c#

Postby sdecorme » 19 Jan 2009 17:09

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

Beardless2
Cone that earned his stripes
Cone that earned his stripes
Posts: 125
Joined: 02 Feb 2007 09:53

Re: vlc activeX with c#

Postby Beardless2 » 19 Jan 2009 20:08

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();

rarao
Blank Cone
Blank Cone
Posts: 11
Joined: 18 Apr 2009 09:18

Re: vlc activeX with c#

Postby rarao » 27 Sep 2009 07:12

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

seblh
New Cone
New Cone
Posts: 1
Joined: 07 Dec 2009 11:58

Re: vlc activeX with c#

Postby seblh » 07 Dec 2009 13:16



Return to “Development around libVLC”

Who is online

Users browsing this forum: Jona and 32 guests