Export (0) Print
Expand All

Label.DrawImage Method

Draws an Image within the specified bounds.

[Visual Basic]
Protected Sub DrawImage( _
   ByVal g As Graphics, _
   ByVal image As Image, _
   ByVal r As Rectangle, _
   ByVal align As ContentAlignment _
)
[C#]
protected void DrawImage(
 Graphics g,
 Image image,
 Rectangle r,
 ContentAlignment align
);
[C++]
protected: void DrawImage(
 Graphics* g,
 Image* image,
 Rectangle r,
 ContentAlignment align
);
[JScript]
protected function DrawImage(
   g : Graphics,
 image : Image,
 r : Rectangle,
 align : ContentAlignment
);

Parameters

g
The Graphics surface on which to draw.
image
The Image to draw.
r
The Rectangle bounds to draw within.
align
The alignment of the image to draw within the Label.

Remarks

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.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Label Class | Label Members | System.Windows.Forms Namespace | ContentAlignment | Graphics | Image | Rectangle

Show:
© 2015 Microsoft