我在窗体上添加了一个面板,当我点击button时让鼠标只能在面板范围内移动
解决方案 »
- 关于软件部署问题?
- winfrom 如何加载控件 提高效率
- 正则表达式的问题,都来拿分啊
- textbox相关问题
- 下拉框 怎么绑定数据后 按文本 选中某一项
- 如何实现快速启动
- 为什么我的windows程序在我的机子上可以访问我机子上的数据库,而我把它安装到别的机子上就不能访问数据库了呢?请高手赐教!谢谢!
- 如何在一个用户控件上自定义一个事件,然后再该控件窗体上实现该事件,在线等待,谢谢英雄丫
- 创建的虚拟目录不能用,这是为什么(在线等,答对马上结贴)急!!!
- 一个VC# WinForm的小问题。
- 关于死锁的问题
- 怎么把图片绑定到 DevExpress.XtraGrid.GridControl 控件中
void button1_Click(object sender, EventArgs e)
{
Rectangle clipRectangle = this.panel1.RectangleToScreen( this.panel1.ClientRectangle );
System.Windows.Forms.Cursor.Clip = clipRectangle;
}
Rectang r=new Rectange(Screen[0].Width,*.Heigth);
Cursor.Clip=r;
{
Rectangle clipRectangle = this.panel1.RectangleToScreen( this.panel1.ClientRectangle );
System.Windows.Forms.Cursor.Clip = clipRectangle;
}不错,要解除的话,
Rectang r=new Rectange(Screen[0].Width,*.Heigth);
Cursor.Clip=r;纯粹!
Cursor.Clip = Rectangle.Empty;//解锁
感谢各位了
Rectangle rect;
if (e.Button == MouseButtons.Left && aaa)
{ aa.X = cInterface.iPanelAMinSize;
aa.Y = 0;
rect = new Rectangle(aa, new Size(cInterface.iPanelAMaxSize, this.Height));
}
else
{
aa.X = 0;
aa.Y = 0;
rect = new Rectangle(aa, new Size(9999, 9999));
}
System.Windows.Forms.Cursor.Clip = rect;