Results 1 to 2 of 2

Thread: Finding Files After Install

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800

    Post

    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

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Post

    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



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width