The method for setting the position of the winform tooltip is not found, and the direction of the arrow is also found,
In fact, these functions can be implemented by tooltip.
Cs code
ToolTip tt = new ToolTip ();
Private void Form2_Load (object sender, EventArgs e)
{
// Bubble display
Tt. IsBalloon = true;
// This method is used.
// Msdn has checked the definition of this method: It is prompted when you place the mouse over the control. It can be used with other attributes and I won't talk about it if I can search it online.
// The display is an arrow down.
// If this method is not used, the arrow orientation is downward, and the position of the tooltip cannot be accurately located. If this method is used, everything becomes so simple.
Tt. SetToolTip (this. textBox1, "Enter the user name ");
}
Private void button#click (object sender, EventArgs e)
{
If (textBox1.Text. Length = 0)
{
// The following method displays an arrow up by default.
// The position is in the middle of the text box, and the position can be determined by the reconstruction method. 1000 indicates that the display time is 1 s.
Tt. Show ("Enter the user name", textBox1, 1000 );
TextBox1.Focus ();
}
}
As follows:
Hope to help you.