AXSoft CaptureScreen - CaptureRegion

Description

Captures a specific region of the currently viewable screen

 
Type

Function

 
Syntax

object.CaptureRegion(ByVal nLeft As Long, ByVal nTop As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Picture

Parameter Type Description
nLeft Long The left pixel of the screen to begin capture from
nTop Long The top pixel of the screen to begin capture from
nWidth Long The total width of the screen to capture
nHeight Long The total height of the screen to capture
 
Return Type

Picture

 
Remarks

If you specify the height and with to be more than the screen height and width, then the captured image will capture from the left and top specified pixels to the end of the screen and then capture the beginning of the screen all the way until the width and/or height to capture and reached.

After the image is captured, the image can be placed in a picurebox control.

Ex: Picture1.Picture = object.CaptureRegion(10,10, 100, 100)

The preceding example captures an image of the screen 100x100 starting at 10 pixels left and 10 pixels down.