VisualStyleRenderer.DrawParentBackground 方法

定義

在指定的區域中繪製控制項父代的背景。

public:
 void DrawParentBackground(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds, System::Windows::Forms::Control ^ childControl);
public void DrawParentBackground (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, System.Windows.Forms.Control childControl);
member this.DrawParentBackground : System.Drawing.IDeviceContext * System.Drawing.Rectangle * System.Windows.Forms.Control -> unit
Public Sub DrawParentBackground (dc As IDeviceContext, bounds As Rectangle, childControl As Control)

參數

dc
IDeviceContext

IDeviceContext,用於繪製 childControl 的父代背景。 這個物件通常屬於子控制項。

bounds
Rectangle

Rectangle,會在其中繪製父控制項的背景。 這個矩形應該位於子控制項的範圍內。

childControl
Control

要繪製其父代背景的控制項。

例外狀況

dcnull

適用於