我能够获得 picturebox1 的宽度和长度,但我找不到正确的代码来获取 picturebox1 的x和y位置,我有已经尝试过以下代码;
job = new ScreenCaptureJob();
System.Drawing.Size area = SystemInformation.WorkingArea.Size;
Rectangle captureRect = new Rectangle(0, 0, pictureBox1.ClientSize.Width -(pictureBox1.ClientSize.Width % 4), pictureBox1.ClientSize.Height - (pictureBox1.ClientSize.Height % 4));
我使用MEE的 screencapturejob 进行录制过程。
答案 0 :(得分:0)
使用类似:
Point pt = pictureBox1.PointToScreen(new Point(0, 0));
Rectangle captureRect = new Rectangle(pt.X, pt.Y, pictureBox1.ClientSize.Width - (pictureBox1.ClientSize.Width % 4), pictureBox1.ClientSize.Height - (pictureBox1.ClientSize.Height % 4));