当前位置: 首页>>代码示例>>C#>>正文


C# HelpProvider.SetHelpNavigator方法代码示例

本文整理汇总了C#中System.Windows.Forms.HelpProvider.SetHelpNavigator方法的典型用法代码示例。如果您正苦于以下问题:C# HelpProvider.SetHelpNavigator方法的具体用法?C# HelpProvider.SetHelpNavigator怎么用?C# HelpProvider.SetHelpNavigator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Forms.HelpProvider的用法示例。


在下文中一共展示了HelpProvider.SetHelpNavigator方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: InitializeHelpProvider

//Declare the HelpProvider.
internal System.Windows.Forms.HelpProvider HelpProvider1;

private void InitializeHelpProvider()
{
    // Construct the HelpProvider Object.
    this.HelpProvider1 = new System.Windows.Forms.HelpProvider();

    // Set the HelpNamespace property to the Help file for 
    // HelpProvider1.
    this.HelpProvider1.HelpNamespace = "c:\\windows\\input.chm";

    // Specify that the Help provider should open to the table
    // of contents of the Help file.
    this.HelpProvider1.SetHelpNavigator(TextBox1, 
        HelpNavigator.TableOfContents);
}
开发者ID:.NET开发者,项目名称:System.Windows.Forms,代码行数:17,代码来源:HelpProvider.SetHelpNavigator

示例2: UseHelpProviderToLoadCHMFile

//引入命名空间
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

public class UseHelpProviderToLoadCHMFile : Form
{
    public UseHelpProviderToLoadCHMFile()
    {
        this.listBox1 = new System.Windows.Forms.ListBox();
        this.checkBox1 = new System.Windows.Forms.CheckBox();
        this.helpProvider1 = new System.Windows.Forms.HelpProvider();
        this.SuspendLayout();

        this.listBox1.FormattingEnabled = true;
        this.listBox1.Location = new System.Drawing.Point(12, 12);
        this.listBox1.Size = new System.Drawing.Size(155, 134);

        this.checkBox1.AutoSize = true;
        this.helpProvider1.SetHelpNavigator(this.checkBox1, System.Windows.Forms.HelpNavigator.TableOfContents);
        this.checkBox1.Location = new System.Drawing.Point(194, 36);
        this.helpProvider1.SetShowHelp(this.checkBox1, true);
        this.checkBox1.Size = new System.Drawing.Size(80, 17);
        this.checkBox1.UseVisualStyleBackColor = true;

        this.helpProvider1.HelpNamespace = "C:\\YourFile.chm";

        this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
        this.ClientSize = new System.Drawing.Size(292, 169);
        this.Controls.Add(this.checkBox1);
        this.Controls.Add(this.listBox1);
        this.helpProvider1.SetHelpNavigator(this, System.Windows.Forms.HelpNavigator.TableOfContents);
        this.helpProvider1.SetShowHelp(this, true);
        this.ResumeLayout(false);
        this.PerformLayout();

    }

    [STAThread]
    public static void Main(string[] args)
    {
        Application.Run(new UseHelpProviderToLoadCHMFile());
    }
    private System.Windows.Forms.ListBox listBox1;
    private System.Windows.Forms.CheckBox checkBox1;
    private System.Windows.Forms.HelpProvider helpProvider1;
    
}
开发者ID:C#程序员,项目名称:System.Windows.Forms,代码行数:53,代码来源:HelpProvider.SetHelpNavigator


注:本文中的System.Windows.Forms.HelpProvider.SetHelpNavigator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。