Defines a brush of a single color. Brushes are used to fill graphics shapes, such as rectangles, ellipses, pies, polygons, and paths. This class cannot be inherited.
Assembly: System.Drawing (in System.Drawing.dll)
Thetype exposes the following members.
|Clone||Creates an exact copy of this object. (Overrides Brush.Clone().)|
|CreateObjRef||Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)|
|Dispose()||Releases all resources used by this Brush object. (Inherited from Brush.)|
|Equals(Object)||Determines whether the specified object is equal to the current object. (Inherited from Object.)|
|GetHashCode||Serves as the default hash function. (Inherited from Object.)|
|GetLifetimeService||Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|InitializeLifetimeService||Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)|
|SetNativeBrush||In a derived class, sets a reference to a GDI+ brush object. (Inherited from Brush.)|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
The following code example adds a shadow to a ListBox using a .
This example is designed to be used with a Windows Form. To run this example, paste this code into a form and call the AddShadow method when handling the form's Paint event. Make sure the form contains a ListBox named listBox1.