AxHost 构造函数

定义

初始化 AxHost 类的新实例。Initializes a new instance of the AxHost class.

重载

AxHost(String)

初始化 AxHost 类的新实例,包装由指定的 CLSID 指示的 ActiveX 控件。Initializes a new instance of the AxHost class, wrapping the ActiveX control indicated by the specified CLSID.

AxHost(String, Int32)

初始化 AxHost 类的新实例,包装由指定的 CLSID 指示的 ActiveX 控件,并使用由指定的 flags 值指示的快捷菜单行为。Initializes a new instance of the AxHost class, wrapping the ActiveX control indicated by the specified CLSID, and using the shortcut-menu behavior indicated by the specified flags value.

AxHost(String)

初始化 AxHost 类的新实例,包装由指定的 CLSID 指示的 ActiveX 控件。Initializes a new instance of the AxHost class, wrapping the ActiveX control indicated by the specified CLSID.

protected:
 AxHost(System::String ^ clsid);
protected AxHost (string clsid);
new System.Windows.Forms.AxHost : string -> System.Windows.Forms.AxHost
Protected Sub New (clsid As String)

参数

clsid
String

要包装的 ActiveX 控件的 CLSID。The CLSID of the ActiveX control to wrap.

AxHost(String, Int32)

初始化 AxHost 类的新实例,包装由指定的 CLSID 指示的 ActiveX 控件,并使用由指定的 flags 值指示的快捷菜单行为。Initializes a new instance of the AxHost class, wrapping the ActiveX control indicated by the specified CLSID, and using the shortcut-menu behavior indicated by the specified flags value.

protected:
 AxHost(System::String ^ clsid, int flags);
protected AxHost (string clsid, int flags);
new System.Windows.Forms.AxHost : string * int -> System.Windows.Forms.AxHost
Protected Sub New (clsid As String, flags As Integer)

参数

clsid
String

要包装的 ActiveX 控件的 CLSID。The CLSID of the ActiveX control to wrap.

flags
Int32

修改控件的快捷菜单行为的 Int32An Int32 that modifies the shortcut-menu behavior for the control.

注解

如果flags参数值的二进制表示形式包含值0x1 表示的位,则该控件的快捷菜单将不包含编辑选项,除非 ActiveX 控件显式提供该选项。If the binary representation of the flags parameter value contains the bit represented by the value 0x1, the shortcut menu for the control will not contain an Edit option unless the ActiveX control explicitly provides it.

如果flags参数值的二进制表示形式包含值0x2 所表示的位,则当 ActiveX 控件提供一组属性页时,该控件的快捷菜单将包含一个属性选项; 否则,快捷菜单仅当 ActiveX 控件显式提供属性选项时,才会包含该选项。If the binary representation of the flags parameter value contains the bit represented by the value 0x2, the shortcut menu for the control will contain a Properties option if the ActiveX control offers a set of property pages; otherwise, the shortcut menu will contain a Properties option only if the ActiveX control explicitly provides it.

适用于