响应MouseMove事件
private void treeView1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(this.treeView1.GetNodeAt(e.X,e.Y)!= null)
{
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Hand;
}
else
{
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
}
}
private void treeView1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
if(this.treeView1.GetNodeAt(e.X,e.Y)!= null)
{
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Hand;
}
else
{
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
}
}
{
if(this.treeView1.GetNodeAt(e.X,e.Y)!= null)
{
this.treeView1.Cursor = System.Windows.Forms.Cursors.Hand;
}
else
{
this.treeView1.Cursor = System.Windows.Forms.Cursors.Default;
}
}