Article ID: 141756
Article Last Modified on 12/9/2003
Private Sub Command1_Click()
Dim ret As Integer
' The following will open the sequencer with the C:\WIN31\CANYON.MID
' file. Canyon is the device_id.
ret = mciSendString( _
"open c:\windows\CANYON.MID type sequencer alias canyon", 0&, 0, 0)
' The wait tells the MCI command to complete before returning control
' to the application.
ret = mciSendString("play canyon wait", 0&, 0, 0)
' Close CANYON.MID file and sequencer device
ret = mciSendString("close canyon", 0&, 0, 0)
End Sub
#If Win32 Then Private Declare Function mciSendString Lib "winmm.dll" Alias _ "mciSendStringA" (ByVal lpstrCommand As String, ByVal _ lpstrReturnString As Any, ByVal uReturnLength As Long, ByVal _ hwndCallback As Long) As Long #ElseIf Win16 Then Private Declare Function mciSendString Lib "mmsystem" (ByVal _ lpstrCommand As String, ByVal lpstrReturnStr As Any, ByVal _ wReturnLen As Integer, ByVal hCallBack As Integer) As Long #End If
Additional query words: 4.00 vb4win vb4all
Keywords: kbwndw KB141756