Label::DrawImage Method (Graphics^, Image^, Rectangle, ContentAlignment)

 

Draws an Image within the specified bounds.

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

protected:
void DrawImage(
	Graphics^ g,
	Image^ image,
	Rectangle r,
	ContentAlignment align
)

Parameters

g
Type: System.Drawing::Graphics^

The Graphics surface on which to draw.

image
Type: System.Drawing::Image^

The Image to draw.

r
Type: System.Drawing::Rectangle

The Rectangle bounds to draw within.

align
Type: System.Drawing::ContentAlignment

The alignment of the image to draw within the Label.

Notes to Inheritors:

When you are creating your own control that derives from Label, you can use this method to draw images onto the surface of the control.

.NET Framework
Available since 1.1
Return to top
Show: