Help System .chm linking problem

M

Mark Thompson

Hi,

I have a VB.NET 2003 application which includes a help system developed
externally into a .chm file which is linked to from the application.
There are 3 ways the application links to the help:

1) Via a menu which just executes the help system using Help.ShowHelp
with the specified URL for the introduction page
2) Via a keyboard shortcut that executes the help system using
Help.ShowHelp with the specified URL.
3) By having a HelpProvider control on a form with the necessary .chm
file referenced in it and having the URL set as the HelpKeyword and
Topic as the HelpNavigator.

Now all of this works fine some of the time. However we have discovered
that when the application is installed, sometimes it does not work. By
not work, I mean you press F1 or select from the menu and the cursor
changes to an hourglass briefly but nothing happens. We have discovered
that if you restart the application then that often, although not
always fixes it. It seems quite random as to when it fails to work but
whenever it does fail, it will definately never work for that execution
session.

The .chm file is stored in the same folder as the application and
therefore I just reference the filename directly with no directory
qualifications.

I have never seen the problem occur on my development system by the
way, only on installed systems and even then only sporadically.

Any ideas as to what might be causing this annoying intermittent
problem?

Regards,

Mark.
 
P

Peter Macej

The .chm file is stored in the same folder as the application and
therefore I just reference the filename directly with no directory
qualifications.

It is not guaranteed that Windows will look for CHM files in application
folder. It looks for them in common help folders. You should always set
the full help path at application start. In my experience, it never
worked on other computer when I didn't do that.
 
M

Mark Thompson

Peter said:
It is not guaranteed that Windows will look for CHM files in application
folder. It looks for them in common help folders. You should always set
the full help path at application start. In my experience, it never
worked on other computer when I didn't do that.

By this do you mean that I should always define the path for the help
file explicitly, wherever it is referenced? I can do that of course
although I do have quite a lot of forms and I am going to need to
ensure that they are always set programatically when created as you
cannot set the HelpProvider property to be anything other than
hard-coded and my users can install the software where they like.

So, have I understood you correctly? I need to have a full path defined
every time?

Regards,

Mark.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top