MidiVirtualKeyboard.MidiInputConnect method |
|
Remarks
Connects the virtual piano keyboard to the given MIDI input device. After the connection is established, the connected MIDI input device can be disconnected through the MidiVirtualKeyboard.MidiInputDisconnect method.
In order to establish the connection, the involved input device must have been previously opened through the MidiDevices.Open method.
For further details about the use of the virtual MIDI keyboard see the MidiVirtualKeyboard object section and the How to manage the virtual MIDI piano keyboard tutorial.
Syntax
[Visual Basic] MidiVirtualKeyboard.MidiInputConnect ( hWndKeyboard as IntPtr, nDeviceUniqueId as Int16 ) as enumDjcErrorCodes |
[C#] public enumDjcErrorCodes MidiVirtualKeyboard.MidiInputConnect ( IntPtr hWndKeyboard, Int16 nDeviceUniqueId ); |
[C++] public: enumDjcErrorCodes MidiVirtualKeyboard.MidiInputConnect ( IntPtr hWndKeyboard, Int16 nDeviceUniqueId ); |
Parameter |
Description |
|
|
hWndKeyboard |
Handle of the virtual keyboard as returned by the call to the MidiVirtualKeyboard.Create method |
nDeviceUniqueId |
The unique identifier of the MIDI input device returned by a previous call to the MidiDevices.Open method |
Return value
Value |
Meaning |
|
|
Negative value |
An error occurred. Check the LastError property value in order to see the last error. |
enumDjcErrorCodes.ERR_DJC_NOERROR (0) |
The method call was successful. |