Whenever I use sound, I have to use the filename. Well what if my friend decides to put the game in a different directory? I know you can do this in HTML, can you also do this in vb?
Steve
Printable View
Whenever I use sound, I have to use the filename. Well what if my friend decides to put the game in a different directory? I know you can do this in HTML, can you also do this in vb?
Steve
If the sound file is in the same directory as your Exe file then use App.Path to get the path to your application.
Dim sSoundFile As String
sSoundFile = App.Path
If Right$(sSoundFile, 1) <> "\" Then
sSoundFile = sSoundFile & "\"
End If
sSoundFile = sSoundFile & "MySound.wav"
Good Luck!
------------------
Joacim Andersson
[email protected]
[email protected]
www.YellowBlazer.com