在C#中打开CHM(帮助文件) [英] Open CHM (help file) in C#

查看:561
本文介绍了在C#中打开CHM(帮助文件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用C#打开帮助文件(chm扩展名)。

I'm trying to open help file (chm extension) in C#.

File.Open(@"//help.chm",FileMode.Open, FileAccess.Read, FileShare.Read);

FileStream fileStream = new FileStream(@"c:\help.chm", FileMode.Open);

不起作用:(

推荐答案

您可以使用-

System.Windows.Forms.Help.ShowHelp(Control, String)

因此,假设您处于表单/控件中

So assuming you are in a Form/Control

Help.ShowHelp(this, "file://c:\\helpfiles\\help.chm");

ShowHelp 方法还提供了重载,可转到位于主题内部的特定主题和帮助页面。

ShowHelp method also provides overloads to go to specific topic and help page located inside the compiled HTML help file.

阅读 System.Windows.Forms.Help.ShowHelp

反编译CHM文件 >

就像在命令提示符下执行以下命令一样容易。

Is as easy as executing below command in the command prompt.

hh.exe -decompile <target-folder-for-decompiled-content> <source-chm-file>

例如:

hh.exe -decompile C:\foo\helpchmextracted help.chm

执行上述命令后,您应该在 C:\foo\helpchmextracted 文件夹中找到反编译的内容。

After executing the above command you should find the decompiled content in the C:\foo\helpchmextracted folder.

这篇关于在C#中打开CHM(帮助文件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆