|
-
Jan 8th, 2000, 11:58 AM
#1
Thread Starter
Addicted Member
Im using MciSendString to play a midi, How can I loop it please?
Thankyou
-
Jan 10th, 2000, 10:57 PM
#2
Lively Member
Ok Dayo312 you can try this code:
General Declarations
Dim StatusMusic as Boolean
Private Sub Form_Load()
Dim i As Long
Dim d As String
d = "C:\Midis.mid"
StatusMusic = True
i = mciSendString("open sequencer!" & d & " alias midi", "", 0, 0)
i = mciSendString("play midi", "", 0, 0)
If i Then MsgBox "Error! No midi file in location" & " => " & d
End Sub
Private Sub Timer1_Timer()
Dim MCIStatusLen As Integer
Dim MCIStatus As String
Dim i As Long
If StatusMusic = True Then
MCIStatusLen = 15
MCIStatus = String(MCIStatusLen + 1, " ")
i = mciSendString("STATUS midi MODE", MCIStatus, MCIStatusLen, 0)
If UCase(Left$(MCIStatus, 7)) = "STOPPED" Then
i = mciSendString("PLAY midi FROM 0", "", 0, 0)
End If
End If
End Sub
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
|