Hi
I have a basic c# program and wanted to try adding a help file to it.
1. I created a .chm (myHelp.chm),
2. Loaded a HelpProvider onto my form, Set the namespace to the file location of myHelp.chm,
3. Then use the below line to display.
Help.ShowHelp(this, myHelpProvider.HelpNamespace);
The problem is that when I publish (using Microsoft Visual C# 2005 Express) the program doesn't find the help file unless its in the same path location - which I have to manually add the .chm file to, no good for publishing anywhere but locally myself.
Is there some way I can load the help file as a resource and use that (Note: I can't get the namespace property to register a resource)
or
use a genreic file location ie ..//myHelp.chm to indicate the program is to look in the same directory as the published exe

Help my help file won't display
Marco Minerva
Well, I do not know whether it works or not, just have a look:
Add the Help file to your program and try:
Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "myHelp.chm");
To get the path where you install the program and with Using System.IO at the beginning...
Duncan McC
Hi Thanks
Thats pretty much what I have done now. I found the problem was the lack of setup project in Express, so I have hardcoded where the file is to be found, then when I click once publish it (VS.Net express) I just add a readme text file (with instructions to install) and a folder to put into say program files so the paths match up.
Taylor Meek
There is nothing strange in your problem. A file to be loaded by computer, It needs to exist at the specific path as guided to computer. You try to create a setup project and include the file in the Application Folder so that it must exist when the application requires it.
Cheers ;-)