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)
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)
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.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기