PDA

Click to See Complete Forum and Search --> : Finding Files After Install


SteveCRM
Dec 7th, 1999, 05:40 AM
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

Joacim Andersson
Dec 7th, 1999, 06:00 AM
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
joacim@programmer.net
joacim@yellowblazer.com
www.YellowBlazer.com (http://www.YellowBlazer.com)