Click to See Complete Forum and Search --> : locating help file


July 5th, 2000, 06:27 PM
For some reason my app is having difficulty locating its associated help file on the users machine, even though the help file is in the same directory as the app. Clicking on help brings up the 'Cannot Locate' error message and the user has to browse to the directory and manually locate the file to the app. Any idea on what's going on here? Thanks.

Shawn South
July 5th, 2000, 07:16 PM
How are you designating the path and filename for your helpfile? There are two ways, one of which I typically see as the recommended:

1) Set the file under the Project | Properties menu, on the General tab. Typically, this method is not recommended because it hard-codes the pathname. In other words, if you set it to be C:\MyWork\MyClient\MyProject\Helpfile.hlp then that's exactly the directoy it's going to look for- and it's probably not on your client's machine.

2) Set App.HelpFile in code on startup. I usually see this as the recommended method. Setting

App.HelpFile = App.Path & "Helpfile.hlp"

will always look for the file in the same directory as the application, regardless of where that is.


- Shawn
Game Programmer
Humongous Entertainment, Inc.

delmar
July 5th, 2000, 07:19 PM
Set the help file name in the Project Properties to just the name of the help file with no path, with the help file in the same folder as the executable. Then, register the path of a WinHelp file in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\HELP during installation. For an HTML Help file, register the path in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\HTML HELP.The appropriate help engine will find the correct location ... all you have to do is use the right file name, with no path required.

David Liske
Microsoft HTML Help MVP 1999, 2000