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

Int32 可修改控制項的捷徑功能表行為。An 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.

適用於