Returns a screen image of a specified control or window.

Namespace:  C1.C1PrintDocument
Assembly:  C1.C1PrintDocument.Classic.2 (in C1.C1PrintDocument.Classic.2.dll)

Syntax

C#
public static Bitmap GetWindowImage(
	Control control,
	IntPtr hWnd,
	bool clientAreaOnly
)
Visual Basic (Declaration)
Public Shared Function GetWindowImage ( _
	control As Control, _
	hWnd As IntPtr, _
	clientAreaOnly As Boolean _
) As Bitmap

Parameters

control
Type: System.Windows.Forms..::.Control
Control whose image to return. If this parameter is not null then hWnd parameter is ignored.
hWnd
Type: System..::.IntPtr
Handle of a window whose image to return. It's used only if control parameter is null, otherwise is ignored. If this parameter is used then clientAreaOnly must be false, otherwise an exception will be raised.
clientAreaOnly
Type: System..::.Boolean
Specifies whether all control surface or client area only must be drawn. If hWnd is used then must be false.

Return Value

See Also