vb windowsmediaplayer控件自动播放下一首
PublicSubList1_DblClick()Dimrs1AsNewADODB.RecordsetSetrs1=NewADODB.RecordsetWithrs1.C...
Public Sub List1_DblClick()
Dim rs1 As New ADODB.Recordset
Set rs1 = New ADODB.Recordset
With rs1
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockBatchOptimistic
End With
rs1.Open "select SongUrl from Songs where Title= '" & List1.List(List1.ListIndex) & "' ", conn
If Not rs1.EOF Then
WindowsMediaPlayer1.URL = rs1.Fields("SongUrl")
End If
WindowsMediaPlayer1.settings.autoStart = True
WindowsMediaPlayer1.ToolTipText = List1.List(List1.ListIndex)
End Sub
Public Sub WindowsMediaPlayer1_PlayStateChange(ByVal NewState As Long)
If WindowsMediaPlayer1.playState = wmppsMediaEnded Then
List1.ListIndex = List1.ListIndex + 1
Call List1_DblClick
End If
End Sub
WindowsMediaPlayer1的记录已经移动下一个url,显示正在打开媒体,但是不会自动播放~~处于未播放状态~~请高手看看哪有问题~~谢谢了~~ 展开
Dim rs1 As New ADODB.Recordset
Set rs1 = New ADODB.Recordset
With rs1
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockBatchOptimistic
End With
rs1.Open "select SongUrl from Songs where Title= '" & List1.List(List1.ListIndex) & "' ", conn
If Not rs1.EOF Then
WindowsMediaPlayer1.URL = rs1.Fields("SongUrl")
End If
WindowsMediaPlayer1.settings.autoStart = True
WindowsMediaPlayer1.ToolTipText = List1.List(List1.ListIndex)
End Sub
Public Sub WindowsMediaPlayer1_PlayStateChange(ByVal NewState As Long)
If WindowsMediaPlayer1.playState = wmppsMediaEnded Then
List1.ListIndex = List1.ListIndex + 1
Call List1_DblClick
End If
End Sub
WindowsMediaPlayer1的记录已经移动下一个url,显示正在打开媒体,但是不会自动播放~~处于未播放状态~~请高手看看哪有问题~~谢谢了~~ 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询