VisualStyleRenderer.DrawImage Method (Graphics, Rectangle, Image)

 

Draws the specified image within the specified bounds.

Namespace:   System.Windows.Forms.VisualStyles
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public void DrawImage(
	Graphics g,
	Rectangle bounds,
	Image image
)

Parameters

g
Type: System.Drawing.Graphics

The Graphics used to draw the image.

bounds
Type: System.Drawing.Rectangle

A Rectangle in which the image is drawn.

image
Type: System.Drawing.Image

The Image to draw.

Exception Condition
ArgumentNullException

g or image is null.

If the visual style applies one of the effects specified by the System.Windows.Forms.VisualStyles.IconEffect values to the current element, this method will apply the effect to the drawn image.

.NET Framework
Available since 2.0
Return to top
Show: