共用方式為


MidiInPort.MessageReceived 事件

定義

MidiInPort 收到資料時發生。

// Register
event_token MessageReceived(TypedEventHandler<MidiInPort, MidiMessageReceivedEventArgs const&> const& handler) const;

// Revoke with event_token
void MessageReceived(event_token const* cookie) const;

// Revoke with event_revoker
MidiInPort::MessageReceived_revoker MessageReceived(auto_revoke_t, TypedEventHandler<MidiInPort, MidiMessageReceivedEventArgs const&> const& handler) const;
public event TypedEventHandler<MidiInPort,MidiMessageReceivedEventArgs> MessageReceived;
function onMessageReceived(eventArgs) { /* Your code */ }
midiInPort.addEventListener("messagereceived", onMessageReceived);
midiInPort.removeEventListener("messagereceived", onMessageReceived);
- or -
midiInPort.onmessagereceived = onMessageReceived;
Public Custom Event MessageReceived As TypedEventHandler(Of MidiInPort, MidiMessageReceivedEventArgs) 

事件類型

備註

應用程式應該訂閱此事件來處理輸入訊息。

如果存取訊息的任何部分會導致例外狀況,則可以假設 MidiInPort 已與裝置中斷連線。

適用於