Clicking on a button to display .CHM help file in VB.NET

Tepken Vannkorn picture Tepken Vannkorn · Jul 12, 2011 · Viewed 11.3k times · Source

I want to display a .CHM help file when clicking on a button in VB.NET. Could anyone show me code how to do this?

Private Sub cmdHelp_Click(ByVal sender As System.Objects, Byval e As System.EventArgs)Handles cmdHelp.Click
   'Please help provide some code
End Sub

Answer

Hand-E-Food picture Hand-E-Food · Jul 18, 2011

The .NET API offers the Help class in the System.Windows.Forms namespace. Some examples:

Help.ShowHelp(ParentForm, "HelpFile.chm", HelpNavigator.TableofContents, Nothing)
Help.ShowHelp(ParentForm, "HelpFile.chm", HelpNavigator.Index, Nothing)
Help.ShowHelp(ParentForm, "HelpFile.chm", HelpNavigator.Topic, "Page.html")
Help.ShowHelp(ParentForm, "HelpFile.chm", HelpNavigator.TopicId, 123)
Help.ShowHelp(ParentForm, "HelpFile.chm", HelpNavigator.Keyword, "Keyword")