C# Class Microsoft.WindowsAPICodePack.Taskbar.TabbedThumbnailScreenCapture

Helper class to capture a control or window as System.Drawing.Bitmap
Afficher le fichier Open project: dlech/SshAgentLib Class Usage Examples

Méthodes publiques

Méthode Description
GrabWindowBitmap ( IntPtr windowHandle, System bitmapSize ) : Bitmap

Captures a screenshot of the specified window at the specified bitmap size. NOTE: This method will not accurately capture controls that are hidden or obstructed (partially or completely) by another control (e.g. hidden tabs, or MDI child windows that are obstructed by other child windows/forms).

Private Methods

Méthode Description
ResizeImageWithAspect ( IntPtr originalHBitmap, int newWidth, int maxHeight, bool resizeIfWider ) : Bitmap

/// Grabs a snapshot of a WPF UIElement and returns the image as Bitmap. ///

Resizes the given bitmap while maintaining the aspect ratio.

Method Details

GrabWindowBitmap() public static méthode

Captures a screenshot of the specified window at the specified bitmap size. NOTE: This method will not accurately capture controls that are hidden or obstructed (partially or completely) by another control (e.g. hidden tabs, or MDI child windows that are obstructed by other child windows/forms).
public static GrabWindowBitmap ( IntPtr windowHandle, System bitmapSize ) : Bitmap
windowHandle System.IntPtr The window handle.
bitmapSize System The requested bitmap size.
Résultat System.Drawing.Bitmap