CaptureArea Example for Visual Basic
LEADRasterScr1.ScaleMode = 1 'set to twips
'show area info window
LEADRasterScr1.CaptureAreaShowInfoWindow = True
'show area size during capture
LEADRasterScr1.CaptureAreaShowAreaSize = True
'enable sensitive area info window
LEADRasterScr1.CaptureAreaSensitiveInfoWindow = True
'set zoom factor
LEADRasterScr1.CaptureAreaZoomFactor = CAPTURE_AREA_ZOOM_BY3X
'position capture area info window
LEADRasterScr1.CaptureAreaInfoTop = 1440
LEADRasterScr1.CaptureAreaInfoLeft = 1440
'size the capture area info window
LEADRasterScr1.CaptureAreaInfoWidth = 1440
LEADRasterScr1.CaptureAreaInfoHeight = 2880
'set colors
LEADRasterScr1.CaptureAreaDrawLineColor = vbBlack
LEADRasterScr1.CaptureAreaTextForeColor = vbBlue
LEADRasterScr1.CaptureAreaTextBackColor = vbBlack
'capture with a region
LEADRasterScr1.CaptureAreaBitmapWithRegion = True
'show cursor position with opaque background
LEADRasterScr1.CaptureAreaShowCursorPosition = True
LEADRasterScr1.CaptureAreaShowOpaqueText = True
'disable keyboard
LEADRasterScr1.CaptureAreaEnableKeyboard = False
'do not include cursor in captured image
LEADRasterScr1.CaptureAreaIncludeCursor = False
'setup the background
LEADRasterScr1.CaptureAreaFillBackColor = vbRed
LEADRasterScr1.CaptureAreaFillForeColor = vbBlue
LEADRasterScr1.CaptureAreaFillPattern = CAPTURE_AREA_PATTERN_DIAGCROSS
'capture a round rect
LEADRasterScr1.CaptureAreaDrawLineStyle = CAPTURE_AREA_LINE_DASHDOT
LEADRasterScr1.CaptureAreaDrawEllipseHeight = 500
LEADRasterScr1.CaptureAreaDrawEllipseWidth = 500
'show custom cursor while drawing
LEADRasterScr1.CaptureAreaDrawCursor = LoadPicture("d:\temp\test.cur")
LEADRasterScr1.CaptureAreaDrawCursorIndex = 99
LEADRasterScr1.CaptureAreaUseCrossLinesCursor = False
LEADRasterScr1.CaptureAreaShowDrawCursor = True
'do the capture
LEADRasterScr1.CaptureArea SCR_CAP_AREA_ROUNDRECT
'copy the image to a Main Control
LEADRasterView1.Raster.Bitmap = LEADRasterScr1.Bitmap