Results 1 to 5 of 5

Thread: [RESOLVED] Output Directory Help

  1. #1

    Thread Starter
    Addicted Member mouse88's Avatar
    Join Date
    Mar 2009
    Location
    South Wales, United Kingdom
    Posts
    225

    Resolved [RESOLVED] Output Directory Help

    I have a help file which is in html format and is displayed in a form containing a web browser. I initially want this to be copied to the output directory so that it will be there when the programme is installed and i can then use the file path of the output directory to display the help file.

    Can anyone advise how i would do this, and also if when the user installs the program, they decide to change the default output directory how i would i get my application to know where the helpfile will be?

    Appreciate any help greatly

  2. #2
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: Output Directory Help

    If you mean "how can I tell where the user has installed the program?" (which I think is what you mean by output directory), you can query the Application.StartupPath property.
    Last edited by keystone_paul; May 5th, 2009 at 03:30 PM.

  3. #3

    Thread Starter
    Addicted Member mouse88's Avatar
    Join Date
    Mar 2009
    Location
    South Wales, United Kingdom
    Posts
    225

    Re: Output Directory Help

    Ok ye thats what i meant. Firstly, how would i get the html file in my project so it can be copied to the output directory. Secondly in my code where im passing the web browser the filepath, would i so something like this:

    Dim FilePath as string

    FilePath = Application.StartupPath & "HelpFile.html"

  4. #4
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: Output Directory Help

    You can add it into your project via solution explorer or the project menu - select "Add existing item" and you ought to be able to browse to the file. Then once its in your list make sure that "Copy To Output Directory" is set to Copy in the file's properties window.

    And yes - thats how you would reference the file.

  5. #5

    Thread Starter
    Addicted Member mouse88's Avatar
    Join Date
    Mar 2009
    Location
    South Wales, United Kingdom
    Posts
    225

    Re: Output Directory Help

    Ok problem solved thanks a lot for the help

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