[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
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.
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"
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.
Re: Output Directory Help
Ok problem solved thanks a lot for the help :)