Results 1 to 5 of 5

Thread: Need quick help with a screwy problem

  1. #1

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935

    Post

    I am trying to play some wave files in the \Waves subdir of my programs installation directory. However, it crashes on an Error 53: File not found. I used the App.Path value almost everywhere in my program. I think this may be causing the program because it may be hardcoding App.Path's value when it compiles. I would try CurDir(), but MS says that it is not a reliable method to get the app's dir. Any help PLEASE? Thanks.

    ------------------
    Arien Talabac, author of Tiny Clock, the skinnable alarm clock for Windows--check it out at http://tinyclock.tsx.org.

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Post

    App.Path will reliably yield the path where the application is installed. Did you perhaps forget to add the "\" to the instrunction i.e. MyPath = App.Path & "\waves\" & MyFile? If that's not the problem, put a breakpoint at the line that's causing the problem and see what Path\FileName it's looking for.

    ------------------
    Marty


    [This message has been edited by MartinLiss (edited 01-18-2000).]

  3. #3
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923

    Post

    I use App.Path everywhere in my programs and I can assure you it does not hardcode the path, so that is not the problem.

    Trouble is, there are so many possibilties as to why it cannot find the file.

    Basically, just make sure everything is spelt correctly and everything is syntatically correct. What you could do is place a message box just before the line that starts playing the sound to see the path that is about to get looked in for the sound

    Code:
    Msgbox MyPath
    'Sound playing line including MyPath
    Then you can get a glimpse of the actual path that it is trying to find.

    See if that helps

    Regards,

    ------------------
    - Chris
    [email protected]
    If it ain't broke - don't fix it

  4. #4
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923

    Post

    Hey Marty, you got in first!

  5. #5

    Thread Starter
    Member filburt1's Avatar
    Join Date
    Aug 1999
    Posts
    6,935

    Post

    I don't think that's the problem. You see, when I run the program in the VB IDE, everything is fine. The same for when I compile it and run the exe from THE ORIGINAL PATH! But NOT when I move it (and all its necessary files) to another folder. I'll try stupididy checks later. Thanks for the speedy replies!

    ------------------
    Arien Talabac, author of Tiny Clock, the skinnable alarm clock for Windows--check it out at http://tinyclock.tsx.org.

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