Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help:Play Midi Problems
#3
Not2BeTrusted2 Wrote:help me wit this one lol

Code:
Public 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

Public Sub PlayMidi(Song As String)
Dim i As Long
    
    i = mciSendString("close all", 0, 0, 0)
    i = mciSendString("open " & App.Path & "\Music\" & Song & " type sequencer alias background", 0, 0, 0)
    i = mciSendString("play background notify", 0, 0, frmMirage.hWnd)
End Sub
this code doesnt work... can someone post a code here to play midis that actually work?

you missed out four '""'s

Code:
Public 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

Public Sub PlayMidi(Song As String)
Dim i As Long
    
    i = mciSendString("close all", 0, 0, 0)
    i = mciSendString("open """ & App.Path & "\Music\" & Song & """ type sequencer alias background", 0, 0, 0)
    i = mciSendString("play background notify", 0, 0, frmMirage.hWnd)
End Sub

~Kite
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)