Forums

Full Version: VLScreenCapture from second monitor
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to use a TVLScreenCapture instance to screen-capture my second monitor, like this:

CaptureDisplay := 1; // second monitor
VLScreenCapture1.Enabled := false;
VLScreenCapture1.Stop;
VLScreenCapture1.Region.Top := screen.Monitors[CaptureDisplay].Top;
VLScreenCapture1.Region.Left := screen.Monitors[CaptureDisplay].Left;
VLScreenCapture1.Region.Width := screen.Monitors[CaptureDisplay].Width;
VLScreenCapture1.Region.Height := screen.Monitors[CaptureDisplay].Height;
VLScreenCapture1.Region.Mode := crmScreen;
VLScreenCapture1.ImageSize.Width := ClientWidth;
VLScreenCapture1.ImageSize.Height := ClientHeight;
VLScreenCapture1.Enabled := true;
VLScreenCapture1.Start;

But it's capturing the first display (0) instead of the second (1).

Am I missing something obvious? (Or not so obvious?)

Thanks

ted

Dave

Is the secondary enabled?
I'm not sure what you mean by "secondary enabled" ... I have a 3-monitor configuration and I use the Screen.Monitors[] object to give me configuration data on each. I want to capture the content of the second monitor ... it is by all accounts "enabled" ...


(12-20-2011 05:25 AM)Dave Wrote: [ -> ]Is the secondary enabled?


I got this working now, by setting Region.Mode to crmCustom instead of crmScreen, and doing so before setting the other Region fields.

(12-20-2011 03:09 AM)Ted Wagner Wrote: [ -> ]I'm trying to use a TVLScreenCapture instance to screen-capture my second monitor, like this:

CaptureDisplay := 1; // second monitor
VLScreenCapture1.Enabled := false;
VLScreenCapture1.Stop;
VLScreenCapture1.Region.Top := screen.Monitors[CaptureDisplay].Top;
VLScreenCapture1.Region.Left := screen.Monitors[CaptureDisplay].Left;
VLScreenCapture1.Region.Width := screen.Monitors[CaptureDisplay].Width;
VLScreenCapture1.Region.Height := screen.Monitors[CaptureDisplay].Height;
VLScreenCapture1.Region.Mode := crmScreen;
VLScreenCapture1.ImageSize.Width := ClientWidth;
VLScreenCapture1.ImageSize.Height := ClientHeight;
VLScreenCapture1.Enabled := true;
VLScreenCapture1.Start;

But it's capturing the first display (0) instead of the second (1).

Am I missing something obvious? (Or not so obvious?)

Thanks

ted
Reference URL's