I'm trying to select a media file from a filebox and play it. If the file is in the same directory as my program then this works.
FilenameTxt.Text = File1.FileName
FileName = FilenameTxt.Text
Play_MM
but when I modofy the code like this so it should work with files other than in my directory, It does not work
FilenameTxt.Text = File1.Path & "\" & File1.FileName
FileName = FilenameTxt.Text
Play_MM
I put it in the text box so I can see how it assembles the name and everything looks correct, but it does not work.
Any ideas what could be wrong with teh path?
Play_MM is below
Public Function Play_MM()
mciSendString "Close MM", 0, 0, 0
Last$ = Mainform.hwnd & " Style " & &H40000000
ToDo$ = "open " & FileName & " Alias MM parent " & Last$
i = mciSendString(ToDo$, 0&, 0, 0)
i = mciSendString("put MM window at 16 10 124 120", 0&, 0, 0)
i = mciSendString("play MM", 0&, 0, 0)
End Function
Thanks Ringo