怎样让鼠标进入pictureBox指定区域内变成手形? private void pictureBox2_MouseDoubleClick(object sender, MouseEventArgs e) { if ((e.X > 0 && e.X < 100) && (e.Y > 0 && e.Y < 100)) { //这里怎样让鼠标变成手形? Form2 ff = new Form2(); ff.Show(); } } 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 参考下:private void pictureBox1_MouseMove(object sender, MouseEventArgs e){ Rectangle rect = new Rectangle(20, 20, 50, 50); if (rect.Contains(e.Location)) { this.pictureBox1.Cursor = Cursors.Hand; } else { this.pictureBox1.Cursor = Cursors.Default; }} this.pictureBox2.Cursor = Cursors.Hand; private void pictureBox2_MouseEnter(object sender, EventArgs e) { this.Cursor = Cursors.Hand; } private void pictureBox2_MouseLeave(object sender, EventArgs e) { this.Cursor = Cursors.Default; } private void pictureBox1_MouseEnter( object sender, EventArgs e ) { this.Cursor = Cursors.Hand; } private void pictureBox1_MouseLeave( object sender, EventArgs e ) { this.Cursor = Cursors.Default; } private void pictureBox1_MouseDoubleClick( object sender, MouseEventArgs e ) { int x = e.X; int y = e.Y; if( ( x > 0 && x < 100 ) && ( y > 0 && y < 100 ) ) { this.Cursor = Cursors.Hand; } else { this.Cursor = Cursors.Default; } } C#不调用任何系统函数 Dev LookUpEdit 的苦恼 如何获取通过远程桌面登陆到某台计算机的计算机的计算机名 获取网页源码时出错:当前上下文中不存在名称“Encoding” DataTable操作数据问题....(100分相送) 如何用正则表达式判断中文 C#怎样把log信息写在form中的一个区域?这个区域用什么控件比较合适? 我新手 帮帮这个问题解决 MDI窗口中窗体句柄(急 100分) 如何用C#访问注册表。 请问在C#中 要点对点传输文件用到什么类? 在vs2005 编辑器里怎么隐藏控件的显示
private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
{
Rectangle rect = new Rectangle(20, 20, 50, 50);
if (rect.Contains(e.Location))
{
this.pictureBox1.Cursor = Cursors.Hand;
}
else
{
this.pictureBox1.Cursor = Cursors.Default;
}
}
this.pictureBox2.Cursor = Cursors.Hand;
{
this.Cursor = Cursors.Hand;
} private void pictureBox2_MouseLeave(object sender, EventArgs e)
{
this.Cursor = Cursors.Default;
}
{
this.Cursor = Cursors.Hand;
} private void pictureBox1_MouseLeave( object sender, EventArgs e )
{
this.Cursor = Cursors.Default;
}
{
int x = e.X;
int y = e.Y;
if( ( x > 0 && x < 100 ) && ( y > 0 && y < 100 ) )
{
this.Cursor = Cursors.Hand;
}
else
{
this.Cursor = Cursors.Default;
}
}