Since you don’t do it that often, sometimes it’s hard to remember how you can add and use your Help file (.chm) in your WinForms project, using Visual Studio.

You can use the HelpProvider control and control everything you need through it, or you can do things the simplest way possible.


I just did this for one of my programs, so I know it can work. First of all, add the help file to your project and open the Properties window for that file. In the CopyToOutputDirectory, choose ‘Copy always’ or ‘Copy if newer’. This will make sure, that when you’re debugging/testing your application, that it will copy the file to the bin folder. Without this happening, when you’re running the application in Visual Studio, it won’t be able to find the help file.

In your menu, wherever you want it, add a ‘Help’ button, and give it the old ‘F1′ shortcut. Then, in the event handler for that button, put in the following code:

Help.ShowHelp(Me.Parent, Application.StartupPath & "\yourHelpFile.chm")

That’s all there is to it.