Link to home
Start Free TrialLog in
Avatar of WickedDancer
WickedDancer

asked on

Does anyone know how to get the C# Help and HelpProvider classes to work with CHM files?

Hi,

I have been having trouble getting the HelpProvider class to work with a CHM file we created using RoboHelp.  When the user hits F1, the help file comes up properly, but displays a "Page not found" error in the viewing area. I tried the following in the constructor for my form:

                  this.helpProvider1.SetShowHelp(this, true);
                  this.helpProvider1.SetHelpNavigator(this, HelpNavigator.Topic);
                  this.helpProvider1.SetHelpString(this, "RP_IG_basicinfo");

I also tried:
                  this.helpProvider1.SetShowHelp(this, true);
                  this.helpProvider1.SetHelpNavigator(this, HelpNavigator.Topic);
                  this.helpProvider1.SetHelpKeyword(this, "RP_IG_basicinfo");

Neither seems to work.  Microsoft's examples are not terribly helpful.

Thanks
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Change
this.helpProvider1.SetHelpNavigator(this, HelpNavigator.Topic);

to
this.helpProvider1.SetHelpNavigator(this, HelpNavigator.KeywordIndex);
Avatar of WickedDancer
WickedDancer

ASKER

That doesn't work as these are not keywords that are in the index.  RP_IG_basicinfo is a help topic id.  I did some more research, and apparently HelpNavigator.Topic requires a topic filename as a parameter.  I tried that (basic_information.htm), but that still didn't work.
ASKER CERTIFIED SOLUTION
Avatar of mmarinov
mmarinov

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks.  I had found that one an hour ago off google, and I think it is the best link for help on this topic.
I think like you
B..M