How to open CHM file on specified node TOC (.NET)

后端 未结 3 783
野性不改
野性不改 2021-01-12 14:28

Hi I need implement context help inside my .NET application. I have .chm file and I\'m looking for possibility to open it in standard viewer and hightlight required topic of

相关标签:
3条回答
  • 2021-01-12 14:47

    Thanks Jeff I've found solution.

    Below method doing that - maybe somebody finds it useful. Thanks for help!

    public static void ShowHelpByKeyword(Control sourceControl, string helpFile, string parameter) {
       Help.ShowHelp(sourceControl, helpFile, HelpNavigator.KeywordIndex, parameter);
    }
    
    0 讨论(0)
  • 2021-01-12 14:54

    I think one of the following URL could work or point you to more "web hits" via google. But I think there are some restrictions sometimes like: maybe works only in IE, only if chm in trusted location, some url may only work on certain windows version, ....

    mk:@MSITStore:C:\test.chm::/testpage.htm
    
    ms-its:.\test.chm::/html/test.htm
    

    Seems I wasn't specific enough. You should be able to use the above to launch hh.exe from within your application directly and passing this as URI as an argument.

    Using System.Diagnostics.Process and launching hh.exe like this

    hh.exe mk:@MSITStore:C:\test.chm::/test.htm
    

    should do what you want.

    Check HTMLHelp commandline for more examples

    0 讨论(0)
  • 2021-01-12 14:58

    You might want to look into the Help class. It's what I use to display help in Winforms applications.

    0 讨论(0)
提交回复
热议问题