|
-
Dec 11th, 2000, 02:32 PM
#1
Thread Starter
Junior Member
Can anyone help me with this:
I have made a program, and if you drag the form elsewhere on the screen, a WAV file is played. For the WAV file I have to specify a certain address. Doing that, everything works. Lets say, my WAV file is located in, C:\Media\hello.wav, and my executable file is located in C:\VB\cool.exe.
To play that file, I just enter that file path in my code to play it.
Suppose, I was to give my program to someone else with all the necessary files in their corresponding folders.
Suppose If the person moves my program in to the Program Files folder. By doing this the sound will not be played.
I dont think I am making much sense inn explaining this, so let me try to go in further details:
I have seen programs, which have WAV's playing in their application. No matter what folder i install the application to, the WAV will still play. That is, unless I change the wav files name itself. Make sense? This is what i think How u would do it, but apparently it doesnt work.
\Media\hello.wav
by doing this, i would think even if the user put the Media folder in Program Files, it would still play, but it doesnt! Please someoen HELP!
-
Dec 11th, 2000, 02:38 PM
#2
Frenzied Member
2 solutions
1. put all files in one directory including wav and .exe
and use App.Path object/property
2. write ini files to keep track of their location, and when you run the app it checks if those files are located where the ini says so, if not force them to locate the files and rewrite ini's
first solution is better
-
Dec 11th, 2000, 02:39 PM
#3
Maybe...
Couldn't you have the Wav file install into the app directory?
then use app.path & "sound.wav" ?
Just a thought
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Dec 11th, 2000, 02:40 PM
#4
aaauuurrrggghh!
Foiled again!
I'll get you my pretty!
Kovan 
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Dec 11th, 2000, 02:41 PM
#5
Frenzied Member
you need something called SPEED my friend 
let see if can make it 3 times before i go home
-
Dec 11th, 2000, 02:42 PM
#6
Frenzied Member
or MABYE
you wait for me to answer
then you copy and paste my idea of solving the problem
yep i think thats it 
hehe
-
Dec 11th, 2000, 02:52 PM
#7
hmmm
I think I'll go with curtain 2...
wait for you to answer...

JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Dec 11th, 2000, 02:56 PM
#8
Re: Maybe...
Originally posted by geoff_xrx
Couldn't you have the Wav file install into the app directory?
then use app.path & "sound.wav" ?
Just a thought
This is a good thought. Except that it will not work.
App.Path & "sound.wav" <-returns something like C:\MyProgsound.wav
You have to add the \ in yourself or no sound will be played since the path is not correct.
So it'd be like this:
App.Path & "\sound.wav" <-returns something like C:\MyProg\sound.wav
-
Dec 11th, 2000, 03:12 PM
#9
oops...
My master hath spoken....

typo...Thanks Matthew
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|