我的screencapturejob.rectangle会导致一个异常(ArgumentOutOfRange)。
下面是我的代码:
private void RecButton_Checked(object sender, RoutedEventArgs e)
{
System.Drawing.Size monitorSize = SystemInformation.PrimaryMonitorSize;
Rectangle capRect = new Rectangle(0, 0,monitorSize.Height, monitorSize.Width);
job.CaptureRectangle = capRect; -------------
// job.CaptureRectangle = (0,0,capRect.Width,capRect.Height);
job.OutputPath = @"C:\output\ScreenCap";
job.Start();
}我使用的表达式编码器pro免费。它工作得很好,但在这种情况下,我们得到了异常,谁能告诉我我做错了什么。
发布于 2013-09-24 04:05:59
ScreenCaptureJob不接受不是4的倍数的值。我在使用它时遇到了一些问题,为了防止其他问题,我强制将尺寸设置为16的倍数。
BR
发布于 2016-04-24 17:48:07
你是想录下整个屏幕吗?
如果你想这样做,我建议:
using System.Windows.Forms;
...
Rectangle screenRectangle = Screen.PrimaryScreen.Bounds;
job.CaptureRectangle = screenRectangle;https://stackoverflow.com/questions/17066192
复制相似问题