System.Windows.Forms.ControlPaint.CreateHBitmapColorMask Method

Creates a Win32 HBITMAP out of the image.

Syntax

public static IntPtr CreateHBitmapColorMask (System.Drawing.Bitmap bitmap, IntPtr monochromeMask)

Parameters

bitmap
The System.Drawing.Bitmap to create.
monochromeMask
A pointer to the monochrome mask.

Returns

An IntPtr representing the handle to the bitmap.

Remarks

You are responsible for de-allocating the HBITMAP. If the image uses transparency, the background will be filled with the specified color.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0