Basically I'm trying to build a media program, you open the file, it plays it. Windos Media Player sucks and so I've moved on from using that and I decided to try VLC coz it is compatible with a large range of things etc.
I've been able to install it as an AX Plugin and I can type the MRL of the video into the properties window and it will play that specific video but if i put it in any other way, for example;
[code]AxVLCPlugin1.MRL = "C:\Blah.avi"[/code]
Or try to use an OpenFileDialog it does nothing. What am I doing wrong and how can I get it so when a user opens a file it will play it?
i have a better question, what do you plan to accomplish with sticking a vlc activex plugin into a windows form?
well I want to play music, videos etc but windows media player sucks and so I thought this was a better alternative. Just can't get so the user can select their own videos/music.
So like a VLC library almost? Consider saving the library as an xml file, then parsing it on load. If you want to get really fancy, have opening a video file move the video to a local subfolder so you can just copy/paste to a flash drive or another computer and still have your library with you.
Anyway, maybe the VideoLAN Wiki can help you a bit? [url]http://wiki.videolan.org/ActiveX#Installing[/url]
I read through the page, but it hasnt helped. I think the problem may be to do with the open file dialog. Here's my code;
[code]
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
AxVLCPlugin1.MRL = OpenFileDialog1.FileName
AxVLCPlugin1.play()
End If
End Sub
[/code]
I once tried to open a video with VLC in VB.net and I got a bsod :S.
Anyway here is my code to open it:
[code]
AxVLCPlugin21.playlist.add(OpenFileDialog1.FileName)
AxVLCPlugin21.playlist.play()
[/code]
You gotta use the VLC Plugin 2.1 though.
Thanks a lot that works perfectly!
I don't know why but it gives a bsod when I open a video with it. Did it give you a bsod when you play a video with it?
unnecessary wrappers are the best
No. It works perfectly now. I don't know why it would BSOD but thanks.
Sorry, you need to Log In to post a reply to this thread.