CHM File in .Net project: can't reach the topic Id correctly

Solution 1:

I assume it is only the problem of the remaining tab in the navigation pane on the left.

I still tried some things like auto-sync on/off when compiling the help - but in the context of your question without success.

Now I only have the idea to open the help window additionally with the call for the table of contents and to synchronize to the context ID only afterwards (see code below).

The double operation will probably not be noticed by the user of the program.

I would not recommend switching to Microsoft Help2 for application help.

  Private Sub btnOpenHelpContextId02_Click(sender As Object, e As EventArgs) Handles btnOpenHelpContextId02.Click
    Dim strContextID As String
    strContextID = "20010"
    ' --- Open help file - Table of contents (next line inserted only to reset navigation pane to TOC (fix tab issue))
    Help.ShowHelp(Me.btnOpenHelpContextId02, HelpProvider1.HelpNamespace, HelpNavigator.TableOfContents)
    ''--- Show CHM contents tab and a special topic by TopicID -----
    Help.ShowHelp(Me.btnOpenHelpContextId02, HelpProvider1.HelpNamespace, HelpNavigator.TopicId, strContextID)
  End Sub