Add "Help" button

How can I add "Help" button to my forms

Like the picture:
http://img.majidonline.com/thumb/39010/Untitled-3.gif



Answer this question

Add "Help" button

  • AnthonyOpsDE

    Hi

    Why dont you use a tooTip control from your toolbox property, so that when the user hover/clicks on the control (e.g Button, textBox, whatever) it displays a message which you can set in the control tooTip in Tooltip properties.

    Hope this Helps



  • Derek Hart

    Hi

    Thank for replying here is the Solution.

    Step 1

    Maksim Libenson wrote:

    Hi,

    You should set MaximizeBox and MinimizeBox properties of your form to False, and then set HelpButton property True.

    Max

    Step 2

    Add a new event Handler to FormName.Designer.cs for the HelpButton like :-

  • Chechin

    Sibusiso wrote:

    Hi

    Im scratching my head here, What are you trying to do

    A sample code or a detailed description please.

    for example when you wanna connect to internet via dial-up you see
    http://img.majidonline.com/pic/39011/Untitled-5.gif
    I wanna have a button like that . but when a person click on that buton see a messagebox that have something about my program .


  • Kari

    It's that file. where should I add

    Sibusiso wrote:

    HelpButtonClicked += new System.ComponentModel.CancelEventHandler(Form1_HelpButtonClicked);

    And where should I add

    Sibusiso wrote:

    private void Form1_HelpButtonClicked(Object sender, CancelEventArgs e)

    {

    MessageBox.Show("My Program Details", "Version 1", MessageBoxButtons.OK ,MessageBoxIcon.Information);

    }

    --------------------------------Form1.Designer.cs-----------------------------

    namespace WindowsApplication1

    {

    partial class Form1

    {

    /// <summary>

    /// Required designer variable.

    /// </summary>

    private System.ComponentModel.IContainer components = null;

    /// <summary>

    /// Clean up any resources being used.

    /// </summary>

    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>

    protected override void Dispose(bool disposing)

    {

    if (disposing && (components != null))

    {

    components.Dispose();

    }

    base.Dispose(disposing);

    }

    #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.SuspendLayout();

    //

    // Form1

    //

    this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

    this.ClientSize = new System.Drawing.Size(292, 266);

    this.HelpButton = true;

    this.MaximizeBox = false;

    this.MinimizeBox = false;

    this.Name = "Form1";

    this.Text = "Form1";

    this.Load += new System.EventHandler(this.Form1_Load);

    this.ResumeLayout(false);

    }

    #endregion

    }

    }

    ------------------------------------------------------------------------------


  • Anders Tornblad

    I have a Textbox in my program.I wanna When a person clicks on the help button and then clicks on the textbox sees something like "connect Dial-up Connection" window. What should I do
  • David Weller MSFT

    Ashraf Hameeda T wrote:

    Where is the picture

    Where and how you want to have Help implemented

    sorry . I added it a minute ago.


  • Jason1

    hooman.tadbiri wrote:
    It's that file. where should I add

    Sibusiso wrote:

    HelpButtonClicked += new System.ComponentModel.CancelEventHandler(Form1_HelpButtonClicked);

    And where should I add

    Sibusiso wrote:

    private void Form1_HelpButtonClicked(Object sender, CancelEventArgs e)

    {

    MessageBox.Show("My Program Details", "Version 1", MessageBoxButtons.OK ,MessageBoxIcon.Information);

    }

    --------------------------------Form1.Designer.cs-----------------------------

    namespace WindowsApplication1

    {

    partial class Form1

    {

    /// <summary>

    /// Required designer variable.

    /// </summary>

    private System.ComponentModel.IContainer components = null;

    /// <summary>

    /// Clean up any resources being used.

    /// </summary>

    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>

    protected override void Dispose(bool disposing)

    {

    if (disposing && (components != null))

    {

    components.Dispose();

    }

    base.Dispose(disposing);

    }

    #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.SuspendLayout();

    //

    // Form1

    //

    this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);

    this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

    this.ClientSize = new System.Drawing.Size(292, 266);

    this.HelpButton = true;

    HelpButtonClicked += new System.ComponentModel.CancelEventHandler(Form1_HelpButtonClicked);

    this.MaximizeBox = false;

    this.MinimizeBox = false;

    this.Name = "Form1";

    this.Text = "Form1";

    this.Load += new System.EventHandler(this.Form1_Load);

    this.ResumeLayout(false);

    }

    #endregion

    }

    }

    ------------------------------------------------------------------------------

    and Embed this code to your Form1.cs

    private void Form1_HelpButtonClicked(Object sender, CancelEventArgs e)

    {

    MessageBox.Show("My Program Details", "Version 1", MessageBoxButtons.OK ,MessageBoxIcon.Information);

    }



  • jcatnc

    hooman.tadbiri wrote:

    Tank you . But where should I add

    Sibusiso wrote:

    private void Form1_HelpButtonClicked(Object sender, CancelEventArgs e)

    {

    MessageBox.Show("My Program Details", "Version 1", MessageBoxButtons.OK ,MessageBoxIcon.Information);

    }

    ------------------Form1.cs------------------

    using System;

    using System.Collections.Generic;

    using System.ComponentModel;

    using System.Data;

    using System.Drawing;

    using System.Text;

    using System.Windows.Forms;

    namespace WindowsApplication1

    {

    public partial class Form1 : Form

    {

    public Form1()

    {

    InitializeComponent();

    }

    private void Form1_Load(object sender, EventArgs e)

    {

    }

    private void Form1_HelpButtonClicked(Object sender, CancelEventArgs e)

    {

    MessageBox.Show("My Program Details", "Version 1", MessageBoxButtons.OK ,MessageBoxIcon.Information);

    }

    }

    }

    -------------------------------------------------

    Marked with Red Hope this does the trick



  • Tianyu Li

    Hi,

    You should set MaximizeBox and MinimizeBox properties of your form to False, and then set HelpButton property True.

    Max



  • MarkPierce

    Where is the picture

    Where and how you want to have Help implemented


  • PaulCowan

    Tank you . But where should I add

    Sibusiso wrote:

    private void Form1_HelpButtonClicked(Object sender, CancelEventArgs e)

    {

    MessageBox.Show("My Program Details", "Version 1", MessageBoxButtons.OK ,MessageBoxIcon.Information);

    }

    ------------------Form1.cs------------------

    using System;

    using System.Collections.Generic;

    using System.ComponentModel;

    using System.Data;

    using System.Drawing;

    using System.Text;

    using System.Windows.Forms;

    namespace WindowsApplication1

    {

    public partial class Form1 : Form

    {

    public Form1()

    {

    InitializeComponent();

    }

    private void Form1_Load(object sender, EventArgs e)

    {

    }

    }

    }

    -------------------------------------------------


  • BenMo

    Sibusiso wrote:

    Hi

    Why dont you use a tooTip control from your toolbox property, so that when the user hover/clicks on the control (e.g Button, textBox, whatever) it displays a message which you can set in the control tooTip in Tooltip properties.

    Hope this Helps

    I wanna when a person clicks on the help button sees a message box and if he/she closed that messagebox then when he/she clicks on my textbox see sometig. else if he/she doesn't click on the help button at first and clicks on the textbox doesn't see anyting.what should I do


  • Ryan R

    Hi

    Im scratching my head here, What are you trying to do

    A sample code or a detailed description please.



  • Jeroen123

    hooman.tadbiri wrote:
    I have a Textbox in my program.I wanna When a person clicks on the help button and then clicks on the textbox sees something like "connect Dial-up Connection" window. What should I do

    I need more help,please.


  • Add "Help" button