C# 如何在C语言中创建“区域选择器”?
完全一样,但是没有形式上的限制,我需要能够得到矩形坐标C# 如何在C语言中创建“区域选择器”?,c#,select,desktop,capture,area,C#,Select,Desktop,Capture,Area,完全一样,但是没有形式上的限制,我需要能够得到矩形坐标 感谢您的每一点帮助 我希望您能够按照链接中给出的代码绘制矩形。 现在,你要得到坐标X,Y,左,右。 在Form1\u Move中添加以下新行 private void Form1_MouseMove(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { Rect = new Rectangle(Rect.Left
感谢您的每一点帮助 我希望您能够按照链接中给出的代码绘制矩形。 现在,你要得到坐标X,Y,左,右。 在Form1\u Move中添加以下新行
private void Form1_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
Rect = new Rectangle(Rect.Left, Rect.Top, e.X - Rect.Left, e.Y - Rect.Top);
label3.Text = Rect.Left.ToString();
label4.Text = Rect.Top.ToString();
label1.Text = e.X.ToString();
label2.Text = e.Y.ToString();
}
this.Invalidate();
}
类似于“也许”的东西?我需要能够在表单外创建一个矩形。你想实现什么?您想对“屏幕”部分进行“选择”还是什么?