I have a picturebox with an associated tooltip that I want to show when the picturebox is clicked, but not when the mouse is hovered over it. I tried creating an empty MouseHover event for the picturebox, but the tooltip is still displayed:
private void pictureBox3_MouseHover(object sender, EventArgs e)
{
}
private void pictureBox3_Click(object sender, EventArgs e)
{
int durationMilliseconds = 30000;
toolTip1.Show(toolTip1.GetToolTip(pictureBox3), pictureBox3, durationMilliseconds);
}
What can I do so that the tooltip is not displayed on MouseHover?
e.Handled =trueto the hover event. That way the event is marked as handled and subsequent methods on that event are not called.