Results 1 to 5 of 5

Thread: URL defeat me when i deploy my application!<urgent>

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2005
    Posts
    16

    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!

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    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 .

  3. #3
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091

    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

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Jun 2005
    Posts
    16

    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!

  5. #5
    Fanatic Member uniquegodwin's Avatar
    Join Date
    Jul 2005
    Location
    Chennai,India
    Posts
    694

    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
  •  



Click Here to Expand Forum to Full Width