将html帮助文件添加到VS [英] adding html help file to VS

查看:112
本文介绍了将html帮助文件添加到VS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

任何人都可以提供关于如何将html帮助文件添加到VS 2010应用程序的soem建议.

Hi there,

Can anyone give soem advice on how to add html help files to VS 2010 app.

推荐答案

转到类型或其成员的声明之前的行.这是针对公共成员和类型的.在C#代码中键入"//"(在VB.NET中键入"/")— Visual Studio将为您创建一个注释模板.填写并构建项目.

该版本将创建XML文档文件.默认情况下,仅在调试"配置中会发生这种情况.您可以对其进行测试:另一个引用您的程序集,然后单击添加了引​​用程序集的解决方案资源管理器"节点.您将浏览显示了帮助信息的程序集的反射代码.

[OP澄清后进行编辑]

如果需要现有的HTML文件,则将其添加到项目的目录结构中,然后通过解决方案资源管理器"Add…" =>将其添加到其他文件中. 现有项目…".需要将其复制到您的输出目录.相对于项目的*.* proj文件,由build生成的文件将与源帮助文件放置在输出目录结构中的同一位置(尝试查看).您仅需要指定应复制文件.转到添加文件的解决方案资源管理器"节点,然后激活属性".确保使用以下属性生成操作:无",复制到输出目录:如果更新则复制"或复制到输出目录:始终复制".

还有另一种方法:将任何文件嵌入到程序集的可执行模块中.为此,您需要将文件添加到.RES资源.在这种情况下,它将添加复制到输出目录:请勿复制";添加文件后,您无需更改属性中的任何内容.您可以在运行时使用资源,因为它的内容将以字符串形式通过资源提供给您;另外,您可以为其使用资源URI.

—SA
Go to the line before the declaration of a type or its member. This is intended for public members and types. Type "//" in C# code ("" in VB.NET) — Visual Studio will create a comment template for you. Fill it in and build the project.

The build will create XML document file. By default, it will happen only for the configuration "Debug". You can test it: reference your assembly by another one and click on the Solution Explorer node where you referenced assembly is added. You will browse reflected code of your assembly showing help information.



If you need existing HTML file, add it to your project''s directory structure the was you would add any other file, via Solution Explorer, "Add…" => "Existing Item…". It needs to be copied to your output directory. The file generated by build will be placed at the same position in output directory structure as your source help file relative to your project''s *.*proj file (try it to see). You only need to specify that the file should be copied. Go to Solution Explorer node of the added file and activate Properties. Make sure you use the following properties "Build Action: None", "Copy to Output Directory: Copy if newer" or "Copy to Output Directory: Copy always".

There is another way: to embed any file in your assembly''s executable module. To do that you need to add the file to .RES resource. In this case it will be added with "Copy to Output Directory: do not copy"; you would not need to change anything in properties after you added the file. You can used resource during run time as it content will be available for you through resource as as string; also, you can use resource URI for it.

—SA


大家好,
也许我不是很清楚我的问题.
无论如何,我发现了解决方案..认为如果他们有类似的查询,我会让ppl知道的

1.将帮助文档(html/docx)添加到项目中.右击->添加现有项目->浏览到文件的位置->添加
2.从工具箱中将Helpprovider添加到表单(名称-HelpProvider1)
3.将HelpProvider1的namespace属性设置为项目文件夹中帮助文件的位置.
4.如果您有帮助"菜单项.将此代码添加到菜单项的单击事件-Help.ShowHelp(Me,HelpProvider1.HelpNamespace)

谢谢.
Ann
Hi all,
Maybe i wasnt very clear abt my question..
Anyway i found teh solution.. thought i would let ppl know in case they have a similar query

1. Add the help document ( html / docx ) to the project. Right CLick -> Add existing Item - > Browse to the location of file - > add
2. Add a Helpprovider from the toolbox into the form(name - HelpProvider1)
3. Set the namespace property of the HelpProvider1 to the loaction of the help file in your project folder.
4. In case you have a Help menu item. Add thsi code to the click event of the menu item - Help.ShowHelp(Me, HelpProvider1.HelpNamespace)

Thanks.
Ann


这篇关于将html帮助文件添加到VS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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