Page 1 of 1

VLC on vb.net HELP!!!

Posted: 05 Aug 2006 12:48
by Student guest
HI all
iam doing a school project and i need some help.

when i use the vlc activex control i used the following code

Private Sub btnPlay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnplay.Click

AxVLCPlugin1.addTarget(url, Nothing, AXVLC.VLCPlaylistMode.VLCPlayListAppendAndGo, 0)
AxVLCPlugin1.play()

End Sub


ok this works fine, but this code only plays videos from website links and not from the local sourse like C: drive. I tried replaceing the url bit with "c:\video.mpg" BUT IT DOESNT WORK. Plx help. iam new at this so please excuse me if this question is very basic.

thanks in advance

Posted: 07 Aug 2006 02:53
by Jack L
It works for me. I have 2 differences in my code:

For the 3rd parameter I use the constant 8. Forget what it translates to, but that works for me. You are using 12.

Using play and go you do not need to issue a play command after the addtarget

Posted: 15 Aug 2006 23:57
by dead-man
using open file dialog box to select the files

dlgFile.ShowDialog() 'openfile dialog box
Dim fname As String
fname = dlgFile.FileName.ToString 'the selected file will be played
TextBox1.Text = fname 'shows the file name that is being played in atextbox
Dim MRLstring As String = Strings.Trim(fname) 'gets the filename from the variable:-fname
VLC.addTarget(MRLstring, Nothing, AXVLC.VLCPlaylistMode.VLCPlayListAppendAndGo, -666)

Posted: 16 Aug 2006 02:50
by Jack L
using open file dialog box to select the files

dlgFile.ShowDialog() 'openfile dialog box
Dim fname As String
fname = dlgFile.FileName.ToString 'the selected file will be played
TextBox1.Text = fname 'shows the file name that is being played in atextbox
Dim MRLstring As String = Strings.Trim(fname) 'gets the filename from the variable:-fname
VLC.addTarget(MRLstring, Nothing, AXVLC.VLCPlaylistMode.VLCPlayListAppendAndGo, -666)
Why not try this

dlgFile.ShowDialog() 'openfile dialog box
Dim fname As String
fname = dlgFile.FileName.ToString 'the selected file will be played
TextBox1.Text = fname 'shows the file name that is being played in atextbox
Dim MRLstring As String = Strings.Trim(fname) 'gets the filename from the variable:-fname

msgbox (MRLstring)

VLC.addTarget(MRLstring, Nothing, AXVLC.VLCPlaylistMode.VLCPlayListAppendAndGo, 0)