Opening .chm help file from the menu

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.
 
H

Herfried K. Wagner [MVP]

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'.
 
G

Guest

Hi,
Try this code:
if (System.IO.File.Exists(YourHelpFilePath))
{
Help.ShowHelp(this, YourHelpFilePath,
HelpNavigator.TableOfContents);
}
 

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