14 August 2012

Tooltip for TextBox

Tooltip for TextBox -- Coding  
private void textBox1_TextChanged(object sender, EventArgs e)
{
if (textBox1.Text != "")
{
string str = textBox1.Text;
toolTip1.Show(str, textBox1, 1, 10);
}
else
{
toolTip1.Hide(textBox1);
}
}

No comments: