Announcement

Collapse
No announcement yet.

need some help with vb for winamp

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • need some help with vb for winamp

    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
    heat cannot be created or destroyed

  • #2
    here is full project

    here is full project
    Attached Files
    heat cannot be created or destroyed

    Comment


    • #3
      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.
      *******************************
      *******************************

      Comment

      Working...
      X