here is full project
Below is some vb code. When i enter new song i end restarting current song playing. Anyone know how to stop this? thank you
Private Sub Text1_Change()
Dim Filename As String
Filename = Text1.Text & ".mp3"
If Len(Text1.Text) = 2 Then Text1.Text = ""
If Len(Filename) > 0 And FileExists(Filename) Then
'stop the current song and clear the playlist
'WinAMP_SendCommandMessage WA_STOP
'WinAMP_ClearPlaylist
'open and play the selected file
WinAMP_OpenFile Filename
WinAMP_SendCommandMessage WA_PLAY
'set the track scrollbar info
hscrlTrackPos.Min = 0
hscrlTrackPos.Max = WinAMP_GetTrackLength
hscrlTrackPos.Value = 0
'other initializations
cmdPlayPause.Caption = "&Pause"
tmrScrollUpdate.Enabled = True
cmdPlayPause.Enabled = True
End If
WinAMP_GetStatus
If WinAMP_GetStatus = "STOPPED" Then WinAMP_ClearPlaylist
End Sub
Text1_Change will get called every time you enter a character of the song string. It is probably causing confusion for your winamp play function.
*******************************
*******************************
Bookmarks