All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
HTML 5 预览(3)_[Html教程]
ASP.NET页面HEAD区动态设置全攻略_[Asp.Net教程]
怎么将现有的网站过渡到XHTML_[Html教程]
动态网页PHP程序员的优化调试技术和技巧_[PHP教程]
投票结果的图片进度条显示_[Asp.Net教程]
XML入门教程-XML 浏览器支持_[XML教程]
PHP 开发程序加速运行探索之慢代码优化方法_[PHP教程]
ASP.NET2.0数据库入门之SqlDataSource_[Asp.Net教程]
C#,中启动进程的三种方法_[Asp.Net教程]
gridview超出长度用..代替,提示显示详细信息_[Asp.Net教程]
Reading number is top 10 pictures
Soong ching ling's former residence1
The terra-cotta warriors1
Angie Chiu vijara myth2
NeedWallpaper2
Compared GDP and per capita income in China for 40 years
The other a successor of sora aoi
So beauty, will let you spray blood2
南昌铁路局宜春车务段攸县车站铁路职工福利房被开发商侵占
美丽的桂林风光1
奇趣的世界记录3
Download software ranking
美女写真2
Take off clothes to survival
都市狐狸姑娘传
matrix3
jBuilder2006
Sora aoi 120 minutes
Professional killers2 for Android
Eclipse 4.2.2 For Win32
Tram sex maniac 2 (H) rar bag6
双旗镇刀客A
qq published in(发表于) 2014/7/11 9:17:03 Edit(编辑)
C#中HelpProvider组件应用实例

C#中HelpProvider组件应用实例

C#中HelpProvider组件应用实例

HelpProvider组件

1.功能

HelpProvider组件的功能如下所示。

HelpProvider组件用于将HTML帮助、1.x帮助文件(.htm文件或由HTML Help Workshop产生的 chm文件)与Windows应用程序相关联。可以通过多种方式提供帮助,例如,为Windows窗体中的控件提供区分上下文的帮助。

为特定对话框或对话框中的特定控件提供区分上下文的帮助。

打开帮助文件到特定部分,如目录、索引或搜索功能的主页。

图1所示为HelpProvider组件。



图1 HelpProvider组件

2.属性

(1)Tag属性。该属性获取或设置包含有关 HelpProvider的补充数据的对象。

(2)HelpNamespace属性。该属性用于获取或设置一个值,该值指定与此HelpProvider对象关联的帮助文件名。

语法:

public virtual string HelpNamespace { get; set; }]
属性值:帮助文件的名称,其形式可以是“C:pathsample.chm”或“/folder/file.htm”。

示例

HelpNamespace属性的使用

程序主要代码如下:

string strPath = Application.StartupPath.Substring(0, Application.StartupPath.Substring(0,

Application.StartupPath.LastIndexOf("")).LastIndexOf(""));

strPath += @"sl830F1.html";

this.helpProvider1.HelpNamespace = strPath;

完整程序代码如下:

★★★★★主程序文件完整程序代码★★★★★

using System;

using System.Collections.Generic;

using System.Windows.Forms;

namespace _8_30

{

static class Program

{

///



/// 应用程序的主入口点。

///


[STAThread]

static void Main()

{

Application.EnableVisualStyles();

Application.SetCompatibleTextRenderingDefault(false);

Application.Run(new frmHelpProvider());

}

}

}

★★★★frmHelpProvider窗体设计文件完整程序代码★★★★★

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

namespace _8_30

{

public partial class frmHelpProvider : Form

{

public frmHelpProvider()

{

InitializeComponent();

}

private void button2_Click(object sender, EventArgs e)

{

}

private void button3_Click(object sender, EventArgs e)

{

}

private void frmHelpProvider_Load(object sender, EventArgs e)

{

string strPath = Application.StartupPath.Substring(0, Application.StartupPath.Substring(0,

Application.StartupPath.LastIndexOf("")).LastIndexOf(""));

strPath += @"F1.html";

this.helpProvider1.HelpNamespace = strPath;

}

private void button1_Click(object sender, EventArgs e)

{

}

}

}

★★★★★frmHelpProvider窗体代码文件完整程序代码★★★★★


添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.