Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
Implementing Screen Capture

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 Startup to start up the engine. When you finish using the class, do not forget to call 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 CaptureWindow to capture a window whose handle is passed to the method, and CaptureFullScreen to capture the entire screen. Use CaptureActiveWindow to capture all of the active window. To capture just the client portion of the active window, use CaptureActiveClient. Use CaptureWindowUnderCursor to capture the window immediately under the cursor, and CaptureSelectedObject to capture an image of the selected window's object. To capture an image of a window handle, use CaptureWindow. In addition, you can capture wallpaper, menus and the mouse cursor, using CaptureWallpaper, CaptureMenuUnderCursor and CaptureMouseCursor respectively. To capture an area, use CaptureArea. LEADTOOLS provides two functions for capturing bitmaps, cursors and icons from EXEs or DLLs, CaptureFromExe and ShowCaptureFromExeDialog. ShowCaptureFromExeDialog provides a dialog box for entering capture options. Finally, to stop a capture operation, use StopCapture.

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. These methods and properties are as follows: CaptureOptions property, IsCaptureActive property, ShowCaptureAreaOptionsDialog method, ShowCaptureObjectOptionsDialog method, ShowCaptureOptionsDialog method, DefaultCaptureAreaOptions method, DefaultCaptureObjectOptions method, GetResourcesCount method, SetCaptureHotkeyCallback method, CaptureInformation event handler, ScreenCaptureHotkeyCallback delegate method, ScreenCaptureHelpCallback delegate method.