Export (0) Print
Expand All

Label.DrawImage Method

Draws an Image within the specified bounds.

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

'Declaration
Protected Sub DrawImage ( _
	g As Graphics, _
	image As Image, _
	r As Rectangle, _
	align As ContentAlignment _
)

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

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft