windows media video help

jason1987

Member
Joined
Apr 15, 2007
Messages
14
Programming Experience
Beginner
I currently have a form that has the following code
VB.NET:
Private Sub AxWindowsMediaPlayer1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxWindowsMediaPlayer1.Enter
        Dim filenames As String
        OpenFileDialog1.ShowDialog()
        filenames = OpenFileDialog1.FileName
        AxWindowsMediaPlayer1.URL = filenames
        If (UCase(Microsoft.VisualBasic.Right(filenames, 3)) = "MID") Or _
        (UCase(Microsoft.VisualBasic.Right(filenames, 3)) = "WAV") Then
            AxWindowsMediaPlayer1.Visible = False
        Else
            AxWindowsMediaPlayer1.Visible = True
        End If
    End Sub
this opens up a dialog to open a file when the form starts, i however want the same video file to play each time, so dont want the choice of file avaliable, just want it to run a video file in a set path. how can i do this?
 
Not sure if I understand but can't you just remove the OpenFileDialog and
just hardcode the name?
Sorry much of not help.
 
I'm not sure about the question either, but this will be help for you, jason1987:
VB.NET:
Dim ext As String = IO.Path.GetExtension(filepath)
About the question, perhaps you want to save a file path to a application user settting? and if there is a path there you open it, else dialog?
 
yeah basically i just need to play the file i want in specific location eg,
C:\Documents and Settings\Jason\My Documents\My Videos\car
without getting the user to use a dialog, just want it to play straight away when the form loads
 
Back
Top