Forums
VLScreenCapture from second monitor - Printable Version

+- Forums (http://mitov.com/forum)
+-- Forum: VCL Components (/forum-6.html)
+--- Forum: VideoLab (/forum-19.html)
+--- Thread: VLScreenCapture from second monitor (/thread-77.html)



VLScreenCapture from second monitor - Ted Wagner - 12-20-2011 03:09 AM

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


RE: VLScreenCapture from second monitor - Dave - 12-20-2011 05:25 AM

Is the secondary enabled?


RE: VLScreenCapture from second monitor - Ted Wagner - 12-20-2011 05:35 AM

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