System.Windows.Forms.ImageList.Draw Method

Draws the image indicated by the given index on the specified System.Drawing.Graphics using the specified location and size.

Syntax

public void Draw (System.Drawing.Graphics g, int x, int y, int width, int height, int index)

Parameters

g
The System.Drawing.Graphics to draw on.
x
The horizontal position at which to draw the image.
y
The vertical position at which to draw the image.
width
The width, in pixels, of the destination image.
height
The height, in pixels, of the destination image.
index
The index of the image in the System.Windows.Forms.ImageList to draw.

Remarks

The image is stretched or compressed as necessary to fit the bounds provided.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0