C#/Button ToolTips
Expert: Srini Nagarajan - 10/23/2005
QuestionHi 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
AnswerHi
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