| Overload | Description |
|---|---|
| GradientFillRectangle(Graphics,Rectangle,SpecialEffectsGradientStyle,Color,Color,Int32) | Draws a rectangle onto the target device context, and then fills the rectangle with a gradient that begins with the specified starting color and ends with the specified ending color. |
| GradientFillRectangle(IntPtr,Rectangle,SpecialEffectsGradientStyle,Color,Color,Int32) | Draws a rectangle onto the target device context, and then fills the rectangle with a gradient that begins with the specified starting color and ends with the specified ending color |
This Example shows the minimum requirements for using the GradientFillRectangle method to draw and fill a rectangle with a color gradient.
| Visual Basic | Copy Code |
|---|---|
Public Sub GradientFillRectangle(ByVal g As Graphics, ByVal destRect As Rectangle) | |
| C# | Copy Code |
|---|---|
public void GradientFillRectangle(Graphics g, Rectangle destRect) | |
For more information, refer to Implementing Special Effects.
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family