|
-
Apr 12th, 2000, 09:21 PM
#3
Frenzied Member
Playing MIDI without MM
The code looks like this:
In your General Declarations:
Private Declare Function mciSendString Lib "winmm.dll" Alias _
"mciSendStringA" (ByVal lpstrCommand As String, _
ByVal lpstrReturnString As String, ByVal uReturnLength As Long, _
ByVal hwndCallback As Long) As Long
(all of the above is one really long line)
In the sub where the MIDI will be launched:
'ret = mciSendString("open PATHNAME type sequencer alias myfile", 0&, 0, 0)
ret = mciSendString("play myfile wait", 0&, 0, 0)
ret = mciSendString("close myfile", 0&, 0, 0)
(where I typed PATHNAME, replace it with the full pathname or default path to your Midi file, e.g. c:\midis\xxx.mid)
That's all
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|