用 mciSendString API函數怎樣一直重複撥放?

  用 mciSendString API函數怎樣一直重複撥放?做法是看看是不否到了曲目的結尾,如果是的話就繼續播放

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
Dim StrStatus As String * 255
Dim ST As Double

Private Sub Form_Activate()
 Do
  DoEvents
  mciSendString "status bs length", StrStatus, 255, 0
  ST = Val(StrStatus)
  mciSendString "status bs position", StrStatus, 255, 0
  If ST = Val(StrStatus) Then
   mciSendString "seek bs to start", "", 0, 0
   mciSendString "play bs", "", 0, 0
  End If
 Loop
End Sub


上一頁