共用方式為


Label.DrawImage(Graphics, Image, Rectangle, ContentAlignment) 方法

定義

在指定界限內描繪 Image

protected:
 void DrawImage(System::Drawing::Graphics ^ g, System::Drawing::Image ^ image, System::Drawing::Rectangle r, System::Drawing::ContentAlignment align);
protected void DrawImage (System.Drawing.Graphics g, System.Drawing.Image image, System.Drawing.Rectangle r, System.Drawing.ContentAlignment align);
member this.DrawImage : System.Drawing.Graphics * System.Drawing.Image * System.Drawing.Rectangle * System.Drawing.ContentAlignment -> unit
Protected Sub DrawImage (g As Graphics, image As Image, r As Rectangle, align As ContentAlignment)

參數

g
Graphics

要繪製的 Graphics 表層。

image
Image

要繪製的 Image

r
Rectangle

要其中繪製的 Rectangle 範圍。

align
ContentAlignment

要繪製在 Label 內之影像的對齊。

給繼承者的注意事項

當您建立衍生自 Label 的控制項時,您可以使用這個方法將影像繪製到控制項的介面上。

適用於

另請參閱