Click to See Complete Forum and Search --> : Need quick help with a screwy problem
filburt1
Jan 18th, 2000, 05:23 AM
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.
MartinLiss
Jan 18th, 2000, 05:33 AM
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).]
chrisjk
Jan 18th, 2000, 05:33 AM
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
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
chris.kilhams@btinternet.com
If it ain't broke - don't fix it :)
chrisjk
Jan 18th, 2000, 05:33 AM
Hey Marty, you got in first!
filburt1
Jan 18th, 2000, 06:12 AM
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.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.