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

属性值

表示包含 ActiveX 控件的控件的 ContainerControlA 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

适用于

另请参阅