Graeme_Grant, you are correct, adding a few lines of code proved to me that the directory was changed. But when I run the program and the directory that appears is ALWAYS another directory and always the same directory.
So, first I changed the code in the Form_1 Load Sub to just:
Directory.SetCurrentDirectory("J:\")
Then I deleted the entire sub that actually plays the movie and rewrote it.
Original code:
Private Sub BtnPlay_Click(sender As Object, e As EventArgs) Handles btnPlay.Click
MovieName = TitleTextBox.Text.Trim + ".mp4"
If File.Exists(J:\ + MovieName) Then
MovieName = TitleTextBox.Text
Using sayitForm As New MovieScreen
sayitForm.ShowDialog()
End Using
Else
MessageBox.Show(TitleTextBox.Text & vbCrLf & vbCrLf & ", IS NOT AVAILABLE " & vbCrLf & "AT THIS TIME", "NOT FOUND", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
End Sub
New Code:
Private Sub BtnPlay_Click(sender As Object, e As EventArgs) Handles btnPlay.Click
MovieName = TitleTextBox.Text.Trim + ".mp4"
If File.Exists(MovieName) Then
MovieName = TitleTextBox.Text
Using sayitForm As New MovieScreen
sayitForm.ShowDialog()
End Using
Else
MessageBox.Show(TitleTextBox.Text & vbCrLf & vbCrLf & ", IS NOT AVAILABLE " & vbCrLf & "AT THIS TIME", "NOT FOUND", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
End Sub
As you can see the only change was to eliminate the reference to the drive "\J:" and everything works correctly. I am thoroughly confused as to why, but I ran with it.
darby