AxHost.KeyPress 事件

定義

KeyPress 事件不為 AxHost 類別支援。The KeyPress event is not supported by the AxHost class.

public:
 event System::Windows::Forms::KeyPressEventHandler ^ KeyPress;
[System.ComponentModel.Browsable(false)]
public event System.Windows.Forms.KeyPressEventHandler KeyPress;
member this.KeyPress : System.Windows.Forms.KeyPressEventHandler 
Public Custom Event KeyPress As KeyPressEventHandler 
屬性

備註

如果您嘗試加入或移除KeyPress事件的處理常式NotSupportedException ,則會擲回。If you attempt to add or remove a handler for the KeyPress event, a NotSupportedException is thrown. AxHost類別不支援衍生自Control類別的事件。The events derived from the Control class are not supported by the AxHost class. 建立AxHost包裝函式時,ActiveX 控制項所公開的事件是應該使用的事件。The events exposed by the ActiveX control when the AxHost wrapper is created are the events that should be used.

適用於