"The code is exactly
how I would like to write code and the algorithms used are very
efficient and well-documented."
Van T. Dinh, Microsoft MVP
|
|
Class: CScreenCapture
Screen capturing windows and forms to a picture
|
Procedure Name
|
Type
|
Description
|
|
(Declarations)
|
Declarations
|
Declarations and private variables for the CScreenCapture class
|
|
CaptureType
|
Property
|
Sets the type of screen capture to perform
The value for this property is defined by the EnumCaptureScreenType enumerated property:
ecstScreen: capture the entire screen.
ecstForm: capture the form referred to by the class Form property.
ecstClient: capture the client are of the form referred to by the class Form property.
ecstActive: capture the active, or top-most, window.
|
|
Form
|
Property
|
Sets a handle to the form to use for Form and Client captures.
If you want to perform a screen capture of a specific form, or a specific form's client area, you must tell the class which form to use. Do this by passing a VB form object to this property.
|
|
PictureData
|
Property
|
Gets the contents of the most recent screen capture as an OLE Picture data type (which can be send directly to the Picture property of a PictureBox control)
|
|
PrintOrientation
|
Property
|
Sets the printer orientation
|
|
Capture
|
Method
|
Captures the object defined by the CaptureType property.
Before calling this method, set the CaptureType property to define the object you want to capture.
|
|
CaptureActiveWindow
|
Private
|
Captures the active window to a Printer object
|
|
CaptureClient
|
Private
|
Captures the form's client area to a Printer object
|
|
CaptureForm
|
Private
|
Captures the passed form to a Printer object
|
|
CaptureScreen
|
Private
|
Captures the entire screen to a Printer object
|
|
CaptureWindowToPicture
|
Private
|
Captures the specified part of a window and returns the data as a picture object
|
|
Class_Initialize
|
Initialize
|
Initialize internal variables
|
|
Clear
|
Method
|
Clears the class picture object
|
|
CreatePictureFromBitmap
|
Private
|
Creates a bitmap object from the specified bitmap and palette
|
|
GetBestFit
|
Private
|
Determines the best print orientation for the picture based on a simple height vs. width comparison
|
|
PrintPicture
|
Method
|
Prints the current picture object to the printer specified by the Prn argument.
The orientation for printing is based on the PrintOrientation property.
|
Overview of Total Visual SourceBook
The source code in Total Visual
SourceBook includes modules and classes for Microsoft Access, Visual
Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily
add this professionally written, tested, and documented royalty-free code
into your applications to simplify your application development efforts.
Additional Resources
|
|