I currently have a form that has the following code
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?
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