Visual Basic Radio Player

Discussion in 'Software' started by Novus Natio, May 6, 2007.

  1. Novus Natio

    Novus Natio Private E-2

    i have built a working radio player but it just keeps eating more and more memory. i think its because i dont have it deleteinhg its cache or something. it started out at around 15,000k and after 10 minutes is up to 27,000k. is there any way to get it to stop doing this?
     
  2. Novus Natio

    Novus Natio Private E-2

    i have started a new project but for some reason i get an error and it takes me to Imports Microsoft.MediaPlayer.Interop and says invalid outside procedure. how do i solve this? it is at the very top of my code.

    heres the code



    Imports Microsoft.MediaPlayer.Interop

    Private Sub Label1_Click()

    End Sub

    Private Sub btnOpen_Click()
    Dim openFileDialog1 As New OpenFileDialog()

    'Present the user with a file open dialog box.
    openFileDialog1.Filter = "Windows Media Audio (*.wma)|*.wma|Windows Media Video (*.wmv)|*.wmv"
    openFileDialog1.RestoreDirectory = True

    If openFileDialog1.ShowDialog() = DialogResult.OK Then
    'Open the selected file in the Player.
    Player.URL = openFileDialog1.FileName
    End If
    End Sub

    Private Sub btnPlayPause_Click(Index As Integer)
    Select Case Player.playState

    Case WMPPlayState.wmppsPlaying
    Player.Ctlcontrols.pause()

    Case WMPPlayState.wmppsPaused
    Player.Ctlcontrols.play()

    Case WMPPlayState.wmppsStopped
    Player.Ctlcontrols.play()
    End Select
    End Sub

    Private Sub btnStop_Click()
    Player.Ctlcontrols.stop()
    End Sub

    Private Sub Player_PlayStateChange(ByVal NewState As Long)
    Select Case e.NewState

    Case WMPPlayState.wmppsPlaying 'The Player is playing.
    'Enable the buttons.
    btnPlayPause.Enabled = True
    btnStop.Enabled = True

    'Make btnPlayPause a pause button.
    btnPlayPause.Text = "Pause"

    'Show the title.
    lblTitle.Text = "Title: " & Player.currentMedia.getItemInfoByType("Title", "", 0)

    Case WMPPlayState.wmppsPaused 'The Player is paused.
    'Make btnPlayPause a play button.
    btnPlayPause.Text = "Play"

    Case WMPPlayState.wmppsStopped 'The Player is stopped.
    'Disable the stop button.
    btnStop.Enabled = False

    'Make btnPlayPause a play button.
    btnPlayPause.Text = "Play"

    End Select
    End Sub
     
    Last edited: May 6, 2007

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds