Integrating with CHM File

O

O.B.

I have added a HelpProvider to my GUI. And I have been able to
successfully load the file using the following code:

protected override bool ProcessDialogKey(Keys keyData)
{
bool rv = false;
if (keyData == Keys.F1)
{
Help.ShowHelp(
this,
helpProvider.HelpNamespace);
rv = true;
}
return rv;
}

However, I'd like for the Help to open to specific topic. I am using
a program called Word-2-CHM (by MacroObject) to convert Word files to
CHM files. And it does a great job. It provides me with a .cs file
that contains a bunch of enums for each of the .htm files within the
CHM file. So for example, one enum is "HID_Playbox = 1041" where the
associated help file is "1041.htm" within the CHM file. How does the
Help.ShowHelp() operation support the ability to show this specific
location?
 
O

O.B.

Oh never mind ... figured it out by trial and error:

protected override bool ProcessDialogKey(Keys keyData)
{
bool rv = false;
if (keyData == Keys.F1)
{
Help.ShowHelp(this,
helpProvider.HelpNamespace,
HelpNavigator.Topic,
(int)HelpIdDefines.HID_Playbox + ".htm");
rv = true;
}
return rv;
}
 
R

Rinaldo

Hi funkjunk

It can be simple by the HelpRequested event

private void Radiospeler_HelpRequested(object sender, HelpEventArgs
hlpevent)
{
Help.ShowHelp(this, "Radio speler.chm");
}

rinaldo
 

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