AxHost.ContainingControl 屬性

定義

取得或設定包含 ActiveX 控制項的控制項。Gets or sets the control containing the ActiveX control.

public:
 property System::Windows::Forms::ContainerControl ^ ContainingControl { System::Windows::Forms::ContainerControl ^ get(); void set(System::Windows::Forms::ContainerControl ^ value); };
[System.ComponentModel.Browsable(false)]
public System.Windows.Forms.ContainerControl ContainingControl { get; set; }
member this.ContainingControl : System.Windows.Forms.ContainerControl with get, set
Public Property ContainingControl As ContainerControl

屬性值

ContainerControl,表示包含 ActiveX 控制項的控制項。A ContainerControl that represents the control containing the ActiveX control.

屬性

備註

屬性值可以Parent與屬性不同。 ContainingControlThe ContainingControl property value can be different from the Parent property. 這個ContainerControl屬性所表示的是 ActiveX 控制項的邏輯容器。The ContainerControl represented by this property is the ActiveX control's logical container. 例如,如果 activex 控制項GroupBox裝載于控制項中, GroupBox而且包含在上Form,則 activex 控制項的ContainingControl Parent屬性值會是Form,而屬性值則是。GroupBox控制項。For example, if an ActiveX control is hosted in a GroupBox control, and the GroupBox is contained on a Form, then the ContainingControl property value of the ActiveX control is the Form, and the Parent property value is the GroupBox control.

安全性

UIPermission
適用于所有視窗以取得此屬性值。for all windows to get this property value. 相關聯的列舉:AllWindowsAssociated enumeration: AllWindows

適用於

另請參閱