use api CilpCursor(ref Rectangle);
解决方案 »
- 高手解决:把EXCEL表中的数据如何直接导入数据库???
- 求职面试有什么技巧???
- 求助:关于滚动条
- 求急!请问要如何在crystalreport中显示数据库中的某图片呢?crystalreport中能实现画图功能吗?如果可以,又该如何实现呢?
- WinForm换肤
- 问一个使用c#查询access数据库的问题
- 新手提问:准备用VS.net2003, 如何快速掌握在这个平台上的开发?
- 加急!!远程的在web服务器上建立虚拟目录并可以对其进行删除等操作!!up有分!
- VS自带例子问题求救--在线等待
- 光标混乱
- MSDE和SQL SERVER2000/7.0之间如何做复制
- 请问哪位看过C#程序设计一书,这本书中文版如何,我想买但是要160!所以借宝地问一下
MouseMove
MouseHover/MouseDown/MouseWheel
MouseUp
MouseLeave 这几个事件我给个MouseMove 的其它差不多
protected override void OnMouseMove(MouseEventArgs mea)
{if((this.ClientRectangle.lift<mea.x<this.ClientRectangle.right)&&
this.ClientRectangle.top<mea.y<this.ClientRectangle.bottom)
//do somethingelse
return;
public struct Rect
{
[FieldOffset(0)] public int left;
[FieldOffset(4)] public int top;
[FieldOffset(8)] public int right;
[FieldOffset(12)] public int bottom;
}
[DllImportAttribute ("user32.dll")]
public static extern int ClipCursor(ref Rect r);private void button3_Click(object sender, System.EventArgs e)
{
Rect a;
Rectangle r=this.ClientRectangle;
r.Offset(this.Location);
a.top=r.Top ;
a.right =r.Right ;
a.bottom =r.Bottom;
a.left =r.Left;
ClipCursor(ref a);
}
}
[DllImportAttribute ("user32.dll")]
public static extern int ClipCursor(ref Rectangle r);private void button3_Click(object sender, System.EventArgs e)
{
Rectangle r=this.ClientRectangle;
r.Offset(this.Location);
ClipCursor(ref a);
}
}
System.Windows.Forms.Cursor.Clip