Thanks Mike , quite so like simple control(set the ToolTip property of the button in designer).
But the other control like ListView , as we all know ,if set the ToolTip property of the ListView , the ToolTip would be shown only mouse on the first column ,this is not welcome.The ToolTip shows on the second column is what I want .
I use mouse over event , just want to get the mouse coordinate , just like :
private void listView1_MouseMove(object sender, MouseEventArgs e){
int startLocation = listView1.Location.X + listView1.Columns[0].Width;
int endLocation = listView1.Location.X + listView1.Columns[0].Width + listView1.Columns[1].Width;
ListViewItem selection = listView1.GetItemAt(e.X, e.Y);
if (e.Y > startLocation &&e.X <= endLocation)
{
if (selection != null)
{
this.toolTip1.SetToolTip(listView1, selection.SubItems[1].Text);
}
}
}
if use mouse enter orhover event , how can I get the mouse coordinate ,just like :
listView1_MouseEnter(object sender, EventArgs e)
In addition , Mouse Enter event causes that the ToolTip shows as long as the mouse enter the control .