Screen Capture

Implementing Screen Capture

LEADTOOLS provides functions for capturing all or part of the screen. The result can then be used with any of the LEADTOOLS image processing functions and can be saved in any of the more than 150 file formats that LEAD supports.

With the LEADTOOLS Capture feature you can capture the:

LEADTOOLS also allows a selected area of the screen to be captured in a wide array of shapes such as:

Bitmap, Icon and Cursor resources can be captured from 16- or 32-bit Windows EXE and DLL files. Options include:

Capturing Screen Images:

LEADTOOLS supports a number of classes and methods for capturing images from the screen. Before starting to capture, you need to call ScreenCaptureEngine.Startup to start up the engine. When you finish using the class, do not forget to call ScreenCaptureEngine.Shutdown to shut down the engine.

You can capture the entire screen, or you can select to capture some small part of the screen. Use ScreenCaptureEngine.CaptureWindow to capture a window whose handle is passed to the method, and ScreenCaptureEngine.CaptureFullScreen to capture the entire screen. Use ScreenCaptureEngine.CaptureActiveWindow to capture all of the active window. To capture just the client portion of the active window, use ScreenCaptureEngine.CaptureActiveClient. Use ScreenCaptureEngine.CaptureWindowUnderCursor to capture the window immediately under the cursor, and ScreenCapture.ScreenCaptureEngine.CaptureSelectedObject to capture an image of the selected window's object.

To capture an image of a window handle, use ScreenCaptureEngine.CaptureWindow. In addition, you can capture wallpaper, menus and the mouse cursor, using ScreenCaptureEngine.CaptureWallpaper, ScreenCaptureEngine.CaptureMenuUnderCursor and ScreenCaptureEngine.CaptureMouseCursor respectively. To capture an area, use ScreenCaptureEngine.CaptureArea. LEADTOOLS provides two functions for capturing bitmaps, cursors and icons from EXEs or DLLs, ScreenCaptureEngine.CaptureFromExe and ScreenCaptureEngine.ShowCaptureFromExeDialog.

ScreenCaptureEngine.ShowCaptureFromExeDialog provides a dialog box for entering capture options. Finally, to stop a capture operation, use ScreenCaptureEngine.StopCapture.

The hot key needs to be pressed to complete the capture. The default hot key is F11. To change the hot key you need to use ScreenCaptureEngine.CaptureOptions property. The user can immediately capture by setting the hot key to Keys.None.

Getting and Setting Capture Information:

In addition to the capture functions given above, there are a number of methods and properties that can be used to get and set capture information. There is also one event handler and two delegate methods to handle different kinds of events. For specifics, refer to the following lists:

Properties

ScreenCaptureEngine.CaptureOptions

ScreenCaptureEngine.IsCaptureActive

Methods

ScreenCaptureEngine.ShowCaptureAreaOptionsDialog

ScreenCaptureEngine.ShowCaptureObjectOptionsDialog

ScreenCaptureEngine.ShowCaptureOptionsDialog

ScreenCaptureEngine.DefaultCaptureAreaOptions

ScreenCaptureEngine.DefaultCaptureObjectOptions

ScreenCaptureEngine.GetResourcesCount

ScreenCaptureEngine.SetCaptureHotkeyCallback

Events

ScreenCaptureEngine.CaptureInformation (event handler)

ScreenCaptureHotkeyCallback (delegate method)

ScreenCaptureHelpCallback (delegate method)

Help Version 21.0.2021.11.1
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Imaging, Medical, and Document
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.