Opening .chm help file from the menu

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

C#, VS .Net 2003.
In my winform application I added a menu item that is suppose to open a .chm
help file (as commonly available in win application).
I tried the following code on the menu item's click event but it is not
working:
File.Open(Application.StartupPath + "\\sc2p_h.chm", FileMode.Open,
FileAccess.Read);

Can someone please advise what is wrong or how to do that?

Thanks.
 
orit said:
C#, VS .Net 2003.
In my winform application I added a menu item that is suppose to open a
.chm
help file (as commonly available in win application).
I tried the following code on the menu item's click event but it is not
working:
File.Open(Application.StartupPath + "\\sc2p_h.chm", FileMode.Open,
FileAccess.Read);

Take a look at the 'HelpProvider' class and 'Process.Start'.
 
Hi,
Try this code:
if (System.IO.File.Exists(YourHelpFilePath))
{
Help.ShowHelp(this, YourHelpFilePath,
HelpNavigator.TableOfContents);
}
 
Back
Top