How to make tooltip move with mouse (winforms)
- by BlueRaja The Green Unicorn
I want it to move when the mouse moves, and disappear when the pointer isn't over the label.
This doesn't work:
private void lblRevisionQuestion_MouseMove(object sender, MouseEventArgs e)
{
toolTip1.Show("test", this, PointToClient(MousePosition), Int32.MaxValue);
}
private void lblRevisionQuestion_MouseLeave(object sender, EventArgs e)
{
toolTip1.Hide(this);
}
As soon as the tooltip appears, it steals focus away from the form, evoking MouseLeave. Then the tooltip hides, and the pointer is once again over the label, invoking MouseMove. This results in a choppy, flashing tooltip.
Is there any way to do this?