|
-
Jul 26th, 2005, 06:58 PM
#1
Thread Starter
Junior Member
URL defeat me when i deploy my application!<urgent>
hi,everyone.
i have huge movie and sound file in my application.the method i access them is set up a path for them.
for example, wmp.URL = "c:/......" somethings like that, my problem is when i copy all "bin" component to other pc,can not find the file in the path. so i decide to back up my application, then modify the all URL in that back up file,because i want to burn it on cd,so the URL i modify to "F:/.....",but i discover that some pc cd rom drive is not F:, maybe is E: or another.... and i found my method is stupid....
can anyone teach me hpw to solve this problem?thanks!
-
Jul 26th, 2005, 09:22 PM
#2
Sleep mode
Re: URL defeat me when i deploy my application!<urgent>
You mean , you want to detect the CD Drive letter ?? sorry I couldn't understand .
-
Jul 26th, 2005, 09:27 PM
#3
Re: URL defeat me when i deploy my application!<urgent>
You need to put the sound file somewhere relative to your exe. Like in <Your exe path>\files, or something like that.
Then, get the path where the executable is using AppDomain.CurrentDomain.BaseDirectory, and then add to the path from there
so, for example, the code would read...
Code:
wmp.URL = AppDomain.CurrentDomain.BaseDirectory & "\files\mysoundfile.wav"
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Jul 28th, 2005, 12:51 AM
#4
Thread Starter
Junior Member
Re: URL defeat me when i deploy my application!<urgent>
to MR Pirate, because i want to burn my project in cd, the the URL i change to F:/....something like that then i found that every pc cd rom drive may not be F:, for example, ur pc cd rom drive is E:,then my program in ur pc can not work properly...but in John computer,his cd rom drive is F:..then can run....
to MR Crptcblade, thanks ur coding!i am trying now.hope can work!
Thanks ur all advise and suggestion!thansk!
-
Jul 28th, 2005, 07:34 AM
#5
Fanatic Member
Re: URL defeat me when i deploy my application!<urgent>
Hey..
U can use.....
Application.startuppath &"\ursound.wav"
this would work too..
Godwin
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
|