Hi there,
My openfiledialog keeps causing me problems with the error:
Here is my code:
The playDVD button works fine, but the openFile button does not. Its the openfiledialog thats causing the problem (see code for why in comment).
What am i doing wrong?
Thanks.
My openfiledialog keeps causing me problems with the error:
The specified file could not be found
Here is my code:
VB.NET:
Private Sub PlayDVD(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDVD.Click
PlayerLoad("D:\VIDEO_TS", 2000)
End Sub
Private Sub OpenFile(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFilm.Click
If openVideo.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
PlayerLoad(openVideo.FileName, 1000)
'PlayerLoad("D:\VIDEO_TS", 1000) ---- THIS DOES NOT WORK EITHER!!!
End If
End Sub
Private Sub PlayerLoad(ByVal fileLoad As String, ByVal sleepTime As Integer)
Try
Process.Start("profiles\tv.umprofile")
MessageBox.Show("""player\player.exe"" - """ & fileLoad & """ - /play")
Shell("""player\player.exe"" - """ & fileLoad & """ - /play")
Threading.Thread.Sleep(sleepTime)
SendKeys.Send("%{ENTER}")
Me.Hide()
btnRestore.Enabled = True
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
The playDVD button works fine, but the openFile button does not. Its the openfiledialog thats causing the problem (see code for why in comment).
What am i doing wrong?
Thanks.