Help Test : Help System « GUI Windows Form « C# / C Sharp

Home
C# / C Sharp
1.2D Graphics
2.Class Interface
3.Collections Data Structure
4.Components
5.Data Types
6.Database ADO.net
7.Design Patterns
8.Development Class
9.Event
10.File Stream
11.Generics
12.GUI Windows Form
13.Language Basics
14.LINQ
15.Network
16.Office
17.Reflection
18.Regular Expressions
19.Security
20.Services Event
21.Thread
22.Web Services
23.Windows
24.Windows Presentation Foundation
25.XML
26.XML LINQ
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source
C# / C Sharp » GUI Windows Form » Help SystemScreenshots 
Help Test
Help Test

/*
User Interfaces in C#: Windows Forms and Custom Controls
by Matthew MacDonald

Publisher: Apress
ISBN: 1590590457
*/


using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace HelpTest
{
  /// <summary>
  /// Summary description for HelpTest.
  /// </summary>
  public class HelpTest : System.Windows.Forms.Form
  {
    /// <summary>
    /// Required designer variable.
    /// </summary>
    private System.ComponentModel.Container components = null;

    public HelpTest()
    {
      //
      // Required for Windows Form Designer support
      //
      InitializeComponent();

      //
      // TODO: Add any constructor code after InitializeComponent call
      //
    }

    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    protected override void Disposebool disposing )
    {
      ifdisposing )
      {
        if (components != null
        {
          components.Dispose();
        }
      }
      base.Disposedisposing );
    }

    #region Windows Form Designer generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
      // 
      // HelpTest
      // 
      this.AutoScaleBaseSize = new System.Drawing.Size(513);
      this.ClientSize = new System.Drawing.Size(528434);
      this.IsMdiContainer = true;
      this.Name = "HelpTest";
      this.Text = "HelpTest";
      this.Load += new System.EventHandler(this.HelpTest_Load);

    }
    #endregion

    /// <summary>
    /// The main entry point for the application.
    /// </summary>
    [STAThread]
    static void Main() 
    {
      Application.Run(new HelpTest());
    }

    private void HelpTest_Load(object sender, System.EventArgs e)
    {
      FormBased frm1 = new FormBased();
      FrameBased frm2 = new FrameBased();
      ControlBased frm3 = new ControlBased();
      
      frm1.MdiParent = this;
      frm2.MdiParent = this;
      frm3.MdiParent = this;
      
      frm1.Show();
      frm2.Show();
      frm3.Show();
    }
  }
}


//===============================================================
//===============================================================

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace HelpTest
{
  /// <summary>
  /// Summary description for ControlBased.
  /// </summary>
  public class ControlBased : System.Windows.Forms.Form
  {
    internal System.Windows.Forms.TextBox TextBox1;
    internal System.Windows.Forms.ListBox ListBox1;
    internal System.Windows.Forms.Label label1;
    internal System.Windows.Forms.HelpProvider HelpProvider1;
    /// <summary>
    /// Required designer variable.
    /// </summary>
    private System.ComponentModel.Container components = null;

    public ControlBased()
    {
      //
      // Required for Windows Form Designer support
      //
      InitializeComponent();

      //
      // TODO: Add any constructor code after InitializeComponent call
      //
    }

    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    protected override void Disposebool disposing )
    {
      ifdisposing )
      {
        if(components != null)
        {
          components.Dispose();
        }
      }
      base.Disposedisposing );
    }

    #region Windows Form Designer generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
      this.TextBox1 = new System.Windows.Forms.TextBox();
      this.ListBox1 = new System.Windows.Forms.ListBox();
      this.label1 = new System.Windows.Forms.Label();
      this.HelpProvider1 = new System.Windows.Forms.HelpProvider();
      this.SuspendLayout();
      // 
      // TextBox1
      // 
      this.TextBox1.Location = new System.Drawing.Point(30135);
      this.TextBox1.Name = "TextBox1";
      this.TextBox1.Size = new System.Drawing.Size(20820);
      this.TextBox1.TabIndex = 11;
      this.TextBox1.Text = "TextBox1";
      // 
      // ListBox1
      // 
      this.ListBox1.Location = new System.Drawing.Point(2619);
      this.ListBox1.Name = "ListBox1";
      this.ListBox1.Size = new System.Drawing.Size(11295);
      this.ListBox1.TabIndex = 10;
      // 
      // label1
      // 
      this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif"8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
      this.label1.Location = new System.Drawing.Point(30179);
      this.label1.Name = "label1";
      this.label1.Size = new System.Drawing.Size(23668);
      this.label1.TabIndex = 9;
      this.label1.Text = "Select a control and press F1 here for a control-based help topic.";
      // 
      // ControlBased
      // 
      this.AutoScaleBaseSize = new System.Drawing.Size(513);
      this.ClientSize = new System.Drawing.Size(292266);
      this.Controls.AddRange(new System.Windows.Forms.Control[] {
                                      this.TextBox1,
                                      this.ListBox1,
                                      this.label1});
      this.Name = "ControlBased";
      this.Text = "ControlBased";
      this.Load += new System.EventHandler(this.ControlBased_Load);
      this.ResumeLayout(false);

    }
    #endregion

    private void ControlBased_Load(object sender, System.EventArgs e)
    {
      HelpProvider1.HelpNamespace = "sample.chm";
      HelpProvider1.SetHelpKeyword(TextBox1, "1007.html");
      HelpProvider1.SetHelpNavigator(TextBox1, HelpNavigator.Topic);
      HelpProvider1.SetHelpKeyword(ListBox1, "1006.html");
      HelpProvider1.SetHelpNavigator(ListBox1, HelpNavigator.Topic);
    }
  }
}



           
       
HelpTest.zip( 58 k)
Related examples in the same category
1.Help iconHelp icon
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.