//onmouseenter仅是一个瞬间的动作,马上结束
protected override void OnMouseEnter(EventArgs e)
{
Point pt = Cursor.Position;
this.Text = "当前光标位置" + pt.ToString();
//鼠标一进入窗体就显示沙漏形状的光标
Cursor.Current = Cursors.WaitCursor; //cursor.current当前光标对象,cursor.current为左,cursors.waitcursor为右;cursors为windows提供的光标集合
}
//鼠标停留事件
protected override void OnMouseHover(EventArgs e)
{
Cursor.Current = Cursors.Cross;
}
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9240380/viewspace-735570/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9240380/viewspace-735570/