Public Declare Function mciMM Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Code:
'--Command Button--'
mciMM "Open Pathname Type Sequencer Alias midiex Buffer 4", "", 0, 0
'--End Code--'
Please reply if you also want to know how to detect the Stop Time of the midi.