Brush.Brush

Overview | Methods | Fields | This Package | All Packages

Brush.Brush

Creates a Brush object.

Syntax

public Brush( Color color )

public Brush( Color color, int style )

public Brush( Bitmap bmp )

public Brush( int handle )

Parameters

color

The Color object that specifies the color of the brush.

style

One of the enumeration constants defined by the BrushStyle class.

bmp

A Bitmap object on which to base the brush.

handle

The handle to a Win32 brush (HBRUSH).

Remarks

The constructors supported by the Brush object enable you to create solid, hatched, pattern, and handle-based brushes.

A brush that you create based on a Win32 handle does not own the handle. Consequently, after using a handle-based brush, you must call the Win32 DeleteObject function to dispose of it.