VisualStyleRenderer.DrawImage Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Draws the specified image within the specified bounding rectangle.
Overloads
DrawImage(Graphics, Rectangle, Image) |
Draws the specified image within the specified bounds. |
DrawImage(Graphics, Rectangle, ImageList, Int32) |
Draws the image from the specified ImageList within the specified bounds. |
DrawImage(Graphics, Rectangle, Image)
- Source:
- VisualStyleRenderer.cs
- Source:
- VisualStyleRenderer.cs
- Source:
- VisualStyleRenderer.cs
Draws the specified image within the specified bounds.
public:
void DrawImage(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::Drawing::Image ^ image);
public void DrawImage (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Drawing.Image image);
member this.DrawImage : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Image -> unit
Public Sub DrawImage (g As Graphics, bounds As Rectangle, image As Image)
Parameters
Exceptions
g
or image
is null
.
Remarks
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.
Applies to
DrawImage(Graphics, Rectangle, ImageList, Int32)
- Source:
- VisualStyleRenderer.cs
- Source:
- VisualStyleRenderer.cs
- Source:
- VisualStyleRenderer.cs
Draws the image from the specified ImageList within the specified bounds.
public:
void DrawImage(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::Windows::Forms::ImageList ^ imageList, int imageIndex);
public void DrawImage (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Windows.Forms.ImageList imageList, int imageIndex);
member this.DrawImage : System.Drawing.Graphics * System.Drawing.Rectangle * System.Windows.Forms.ImageList * int -> unit
Public Sub DrawImage (g As Graphics, bounds As Rectangle, imageList As ImageList, imageIndex As Integer)
Parameters
Exceptions
g
or image
is null
.
imageIndex
is less than 0, or greater than or equal to the number of images in imageList
.
Remarks
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.