You are here:

C#/Button ToolTips

Advertisement


Question
Hi Srini,
I am working on a c# windows application project and I have 2 questions:
1)I have some buttons on my forms and I want to show a tooltip text when the user points to the button,but I couldn't find Tooltip property(or something like that) in prpoerties window.

2) I set a backgroound picture for my form, this picture is a little bigger than my form and I want to fit it in the form.

can you help me please?
thanks: Azar

Answer
Hi

1.   use like this

private void Form1_Load(object sender, System.EventArgs e)
{
  // Create the ToolTip and associate with the Form container.
  ToolTip toolTip1 = new ToolTip();

  // Set up the delays for the ToolTip.
  toolTip1.AutoPopDelay = 5000;
  toolTip1.InitialDelay = 1000;
  toolTip1.ReshowDelay = 500;
  // Force the ToolTip text to be displayed whether or not the form is active.
  toolTip1.ShowAlways = true;
     
  // Set up the ToolTip text for the Button and Checkbox.
  toolTip1.SetToolTip(this.button1, "My button1");
  toolTip1.SetToolTip(this.checkBox1, "My checkBox1");
}


2. Hi Look at the following URL you may get some solution..

http://www.codeproject.com/csharp/bmprgnform.asp

Happy Programming!!

-srini

C#

All Answers


Answers by Expert:


Ask Experts

Volunteer


Srini Nagarajan

Expertise

can answer any kind of questions in ASP.NET, C#, VB.NET, ASP, SharePoint 2007, Coldfusion, Powerbuilder 7.00 / 8.00, JAVA servlets, MS SQL 2000 / MSSQL7, Sybase

Experience

Contact me if you need any custom development on ASP.NET, ASP, Coldfusion, Powerbuilder

©2012 About.com, a part of The New York Times Company. All rights reserved.