• (2 Pages)
  • +
  • 1
  • 2

MyMusic Player How to implement a simple MP3 Player Rate Topic: -----

#1 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2216
  • View blog
  • Posts: 9,352
  • Joined: 29-May 08

Posted 12 July 2008 - 07:46 AM

MyMusic Player

Modification: You'll need to add a COM Reference Windows Media Player (the one with path that ends InterOp.WMPLib.dll)

Start a new Windows Form Application project
Ingredients
3 x Buttons
But_Play
But_Pause
But_Stop
2 x Textboxes
Txt_TrackName
Txt_Progress
These need to be readonly
2 x TrackBar
TrackPosition
Volume (Vertical orientation, Minimum =0. Maximum=100)
1 x Timer
Timer1
1 x Listview (Multi Select = False, View=Details, HeaderStyle None)
Add one column called TrackCol


The code
View the code for Form1 and insert the following code

Public Class Form1
#Region "Color Settings"
    Dim CurrentTrackColor As System.Drawing.Color = Color.Red
    Dim PausedTrackColor As System.Drawing.Color = Color.LightYellow
#End Region
    Dim WithEvents Player As New WMPLib.WindowsMediaPlayer
    Dim files As Collections.ObjectModel.ReadOnlyCollection(Of String)
    Dim titles As New List(Of String)
    Dim CurrentPlaying As Integer = 0
    Dim PreviouslyPlaying As Integer = 0

    Private Sub Form1_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
        ' Dispose of player
        Player = Nothing
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        TrackCol.Width = TrackList.Width - 20
        But_Pause.Enabled = False
        But_Stop.Enabled = False
        files = FileIO.FileSystem.GetFiles(My.Computer.FileSystem.SpecialDirectories.MyMusic, FileIO.SearchOption.SearchAllSubDirectories, "*.mp3")
        For Each a As String In files
            Me.TrackList.Items.Add(FileIO.FileSystem.GetName(a))
        Next
        Volume.Value = Player.settings.volume
        Me.Txt_TrackName.Text = Player.URL
        Player.settings.autoStart = False
        Player.URL = files(0)
        Player.enableContextMenu = False
        With Me.Timer1
            .Interval = 500
            .Start()
            .Enabled = True
        End With
    End Sub

    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        ' Form is closing, so shutdown player
        Player.close()
    End Sub

    Private Sub ClickedOnPlayButton(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_Play.Click
        GUIMode("Play")
        updatePlayer()
        Player.controls.play()
    End Sub

    Private Sub ClickedonstopNutton(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_Stop.Click
        Player.controls.stop()
        GUIMode("Stopped")
    End Sub

    Private Sub ClickedonpauseButton(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_Pause.Click
        If Player.playState = WMPLib.WMPPlayState.wmppsPaused Then
            GUIMode("Play")
        Else
            GUIMode("Paused")
        End If
    End Sub

    Private Sub GUIMode(ByRef Guimode As String)
        Select Case Guimode
            Case "Play"
                ' Put GUI in playing mode guise
                Player.controls.play()
                But_Pause.BackColor = System.Drawing.SystemColors.Control
                But_Pause.Enabled = True
                But_Stop.Enabled = True
                But_Play.Enabled = True
            Case "Paused"
                ' put gui in paused mode guise
                But_Pause.Enabled = True
                But_Stop.Enabled = False
                But_Play.Enabled = False
                But_Pause.BackColor = PausedTrackColor
                Player.controls.pause()
            Case "Stopped"
                But_Pause.Enabled = False
                But_Stop.Enabled = False

        End Select
    End Sub

    Private Sub ScrollingVolume(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Volume.Scroll
        ' Change the player's volume
        Player.settings.volume = Volume.Value
    End Sub

    Private Sub Player_MediaError(ByVal pMediaObject As Object) Handles Player.MediaError
        MessageBox.Show("Unrecoverable Problem. Shutting Down", "MyMusic Player")
        Me.Close()
    End Sub

    Private Sub Player_PlayStateChange(ByVal NewState As Integer) Handles Player.PlayStateChange
        Static Dim PlayAllowed As Boolean = True
        Select Case CType(NewState, WMPLib.WMPPlayState)
            Case WMPLib.WMPPlayState.wmppsReady
                If PlayAllowed Then
                    Player.controls.play()
                End If
            Case WMPLib.WMPPlayState.wmppsMediaEnded
                ' Reach end of track move onto next, looping around
                PreviouslyPlaying = CurrentPlaying
                CurrentPlaying = (CurrentPlaying + 1) Mod files.Count
                ' Start protection (without it next wouldn't play
                PlayAllowed = False
                ' Play track
                Player.URL = files(CurrentPlaying)
                Player.controls.play()
                ' End Protection
                PlayAllowed = True
                updatePlayer()
        End Select

    End Sub

    Private Sub updatePlayer()
        ' Display track name
        Txt_TrackName.Text = Player.currentMedia.name
        ' Update TrackPostion
        With TrackPosition
            .Minimum = 0
            .Maximum = CInt(Player.currentMedia.duration)
            .Value = CInt(Player.controls.currentPosition())
        End With
        ' Display Current Time Position and Duration
        Txt_Progress.Text = Player.controls.currentPositionString & vbTab & Player.currentMedia.durationString
        ' Set Volume slide to match current volume
        Volume.Value = Player.settings.volume
        ' Is the CurrentPlaying Track No. is different to the Previous Track number.
        If CurrentPlaying <> PreviouslyPlaying Then
            ' Yes, 
            ' Set the forecolor of the corrisponding track, assiociated with the previous playing track, with the control color
            TrackList.Items(PreviouslyPlaying).ForeColor = System.Drawing.SystemColors.ControlText
        End If
        ' Set the forecolor of the corrisponding track, assiociated with the currently playing track, with the current track color
        TrackList.Items(CurrentPlaying).ForeColor = CurrentTrackColor

    End Sub

    Private Sub Tracks_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TrackList.MouseDoubleClick
        GUIMode("Play")

        ' A track in the tracklisting has been double clicked on
        PreviouslyPlaying = CurrentPlaying
        ' Set CurrentPlaying to position of selected track.
        CurrentPlaying = TrackList.SelectedIndices(0)
        ' Play the track
        Player.URL = files(CurrentPlaying)
        updatePlayer()
        Player.controls.play()
    End Sub

    Private Sub ScrollingTrackPosition(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackPosition.Scroll
        ' Seek the through track
        Player.controls.pause()
        Player.controls.currentPosition = TrackPosition.Value
        Player.controls.play()
        updatePlayer()
        ' Allow the app to do some processing
        Application.DoEvents()
    End Sub

    Private Sub UpdatePlayerTimer(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        updatePlayer()
    End Sub

End Class



Bake in a preheated over a gas mark 6 for 1 hour.

Here one I made earlier
Attached File  MediaPlayer.zip (923.23K)
Number of downloads: 8545
Run

Now enjoy!

This post has been edited by AdamSpeight2008: 15 July 2008 - 04:03 AM


Is This A Good Question/Topic? 0
  • +

Replies To: MyMusic Player

#2 jagatworld  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 0
  • View blog
  • Posts: 31
  • Joined: 11-May 08

Posted 15 July 2008 - 12:07 AM

Hi,
Everything looks fine, but only for that , I'm unable to find this library / control ......

Dim WithEvents Player As New WMPLib.WindowsMediaPlayer
Error : Type 'WMPLib.WindowsMediaPlayer' is not defined.

it is giving error.
Should I import some control or add any reference?

I use VS 2005 Team Suite.

Thanks and Regards.

Jagat.
Was This Post Helpful? 0
  • +
  • -

#3 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2216
  • View blog
  • Posts: 9,352
  • Joined: 29-May 08

Posted 15 July 2008 - 04:02 AM

View Postjagatworld, on 15 Jul, 2008 - 08:07 AM, said:

Hi,
Everything looks fine, but only for that , I'm unable to find this library / control ......

Dim WithEvents Player As New WMPLib.WindowsMediaPlayer
Error : Type 'WMPLib.WindowsMediaPlayer' is not defined.

it is giving error.
Should I import some control or add any reference?

I use VS 2005 Team Suite.

Thanks and Regards.

Jagat.


You'll need to add a COM Reference Windows Media Player (the one with path that ends InterOp.WMPLib.dll)
Was This Post Helpful? 0
  • +
  • -

#4 Speedular  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 25-December 08

Posted 25 December 2008 - 01:36 AM

Big thanks to you; it was very helpful;
I'm just wondering it there a way for example to make the player start at a certain position that I specify; let us say I've got the current position " position = player.Ctlcontrols.currentPosition" and I closed the player app and when I start it again I want it to start from that "position" is this possible?
Was This Post Helpful? 0
  • +
  • -

#5 juunas  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 5
  • View blog
  • Posts: 87
  • Joined: 25-March 09

Posted 26 March 2009 - 07:31 AM

Hey, I have a question about this part:


CurrentPlaying = (CurrentPlaying + 1) Mod files.Count


How exactly does that work? From what I know, modulus would do the job if it was the last song, returning 0. But what if say, you're at index 4 of the playlist, and theres a total of 10 songs, last index being 9. So, the calculation would be:

(4+1) Mod 10

5 Mod 10

Basically 5/10 is 0,5 so I dont know whats the remainder of that, care to explain? I know it works, its just that I want to understand it.
Was This Post Helpful? 0
  • +
  • -

#6 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2216
  • View blog
  • Posts: 9,352
  • Joined: 29-May 08

Posted 26 March 2009 - 08:05 AM

5 / 10 = 0 remainder 5
MOD is simply, give me the remainder from the division.

It simple way to implement continuous looping of all the songs.
Was This Post Helpful? 0
  • +
  • -

#7 juunas  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 5
  • View blog
  • Posts: 87
  • Joined: 25-March 09

Posted 26 March 2009 - 08:08 AM

Of course!! Dumb me! :P

Thanks, now I got it.
Was This Post Helpful? 0
  • +
  • -

#8 hayt777  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 27-May 09

Posted 27 May 2009 - 10:09 PM

So i downloaded your MediaPlayer.zip file.
I'm having the problem that it reads the mp3 files properly and places the track names and all that, then crashes with "unrecoverable error" msgbox.

MSVC Debugger says that

Player.URL = files(0)

Is at fault, and says index is out of range must be non-negative and less than the size of the collection.

The folder that is targeted for the player to read for mp3 files has only 1 mp3 file.

Any ideas why this is happening?

Edit: Ok, It appears to work fine on another one of my computers, just on the developing computer it has the index out of range issue.

However on another computer when you click the 'X' button to close the form, it closes and restarts the current track over again, and that track keeps playing over and over, and you cant stop it since the form was destroyed, if you open the form again, it will just start playing the first track again, mixing that with the already playing track.

I'm really confused now, any ideas would be greatly appreciated, thanks.

Another Quick Edit: Just Noticed that the player autostarts playing even though in the code the player settings are set to autostart = false

This post has been edited by hayt777: 28 May 2009 - 12:17 AM

Was This Post Helpful? 0
  • +
  • -

#9 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2216
  • View blog
  • Posts: 9,352
  • Joined: 29-May 08

Posted 09 June 2009 - 12:30 AM

View Posthayt777, on 28 May, 2009 - 04:09 AM, said:

So i downloaded your MediaPlayer.zip file.
I'm having the problem that it reads the mp3 files properly and places the track names and all that, then crashes with "unrecoverable error" msgbox.

MSVC Debugger says that

Player.URL = files(0)

Is at fault, and says index is out of range must be non-negative and less than the size of the collection.

The folder that is targeted for the player to read for mp3 files has only 1 mp3 file.

Any ideas why this is happening?

It couldn't find the file!. Correction in code that follows.

Quote

Another Quick Edit: Just Noticed that the player autostarts playing even though in the code the player settings are set to autostart = false


Added a new constant at start
 Const CONST_AutoPlayFirst As Boolean = False


Alter Form Load
 If files.Count = 0 Then
   MessageBox.Show("No Music Files Found", My.Application.Info.Title, MessageBoxButtons.OK, MessageBoxIcon.Information)
   Me.Close()
   Exit Sub
  End If
  Player.settings.autoStart = CONST_AutoPlayFirst
  Player.enableContextMenu = False
  Player.settings.invokeURLs = False
  Player.URL = files(0)



Comment out the code
   Case WMPLib.WMPPlayState.wmppsReady
	'If PlayAllowed Then
	' Player.controls.play()
	'End If
 



Quote

Edit: Ok, It appears to work fine on another one of my computers, just on the developing computer it has the index out of range issue.

However on another computer when you click the 'X' button to close the form, it closes and restarts the current track over again, and that track keeps playing over and over, and you cant stop it since the form was destroyed, if you open the form again, it will just start playing the first track again, mixing that with the already playing track.

I'm really confused now, any ideas would be greatly appreciated, thanks.

Try adding corrections.See what happens.
Was This Post Helpful? 0
  • +
  • -

#10 Guest_Jason Charles*


Reputation:

Posted 23 May 2010 - 11:12 PM

Hi,
First of all, it's a cool player. Thanks for sharing with us.

I am trying to add the following functionality. I added a button to import mp3 files and I am trying to show these files in the same TrackList that you've created. The files are getting added in the Tracklist with the following code, but errors out when I doubleclick the mp3 files. I added the following code for the mp3 files import to the same TrackList.

Private Sub Import_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Import.Click
importdiag.ShowDialog() ' Shows a dialog box with mp3 files
End Sub

Private Sub importdiag_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles importdiag.FileOk
For Each track As String In importdiag.FileNames
Me.TrackList.Items.Add(FileIO.FileSystem.GetName(track))
updatePlayer()
Next
End Sub

But the problem is when I doubleclick the mp3 file that's been added, it errors out at the doublclick sub routine with the following message.
"Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index" at the following line in the Tracks_MouseDoubleClick Sub.
Player.URL = files(CurrentPlaying)

Any help is appreciated.
Thanks
Jason Charles

View PostAdamSpeight2008, on 08 June 2009 - 11:30 PM, said:

View Posthayt777, on 28 May, 2009 - 04:09 AM, said:

So i downloaded your MediaPlayer.zip file.
I'm having the problem that it reads the mp3 files properly and places the track names and all that, then crashes with "unrecoverable error" msgbox.

MSVC Debugger says that

Player.URL = files(0)

Is at fault, and says index is out of range must be non-negative and less than the size of the collection.

The folder that is targeted for the player to read for mp3 files has only 1 mp3 file.

Any ideas why this is happening?

It couldn't find the file!. Correction in code that follows.

Quote

Another Quick Edit: Just Noticed that the player autostarts playing even though in the code the player settings are set to autostart = false


Added a new constant at start
 Const CONST_AutoPlayFirst As Boolean = False


Alter Form Load
 If files.Count = 0 Then
   MessageBox.Show("No Music Files Found", My.Application.Info.Title, MessageBoxButtons.OK, MessageBoxIcon.Information)
   Me.Close()
   Exit Sub
  End If
  Player.settings.autoStart = CONST_AutoPlayFirst
  Player.enableContextMenu = False
  Player.settings.invokeURLs = False
  Player.URL = files(0)



Comment out the code
   Case WMPLib.WMPPlayState.wmppsReady
	'If PlayAllowed Then
	' Player.controls.play()
	'End If
 



Quote

Edit: Ok, It appears to work fine on another one of my computers, just on the developing computer it has the index out of range issue.

However on another computer when you click the 'X' button to close the form, it closes and restarts the current track over again, and that track keeps playing over and over, and you cant stop it since the form was destroyed, if you open the form again, it will just start playing the first track again, mixing that with the already playing track.

I'm really confused now, any ideas would be greatly appreciated, thanks.

Try adding corrections.See what happens.

Was This Post Helpful? 0

#11 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2216
  • View blog
  • Posts: 9,352
  • Joined: 29-May 08

Posted 24 May 2010 - 02:29 AM

That occurs because it path to the actual file is stored in a read a read-only collection, which you don't update.
So I updated the sourecode
Public Class Form1
#Region "Color Settings"
    Dim CurrentTrackColor As System.Drawing.Color = Color.Red
    Dim PausedTrackColor As System.Drawing.Color = Color.LightYellow
#End Region
    Dim WithEvents Player As New WMPLib.WindowsMediaPlayer
 Dim files As New List(Of String)
    Dim CurrentPlaying As Integer = 0
 Dim PreviouslyPlaying As Integer = 0
 Private Sub Import_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Import.Click
  importdiag.ShowDialog() ' Shows a dialog box with mp3 files
 End Sub

 Private Sub importdiag_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles importdiag.FileOk
  files.AddRange(importdiag.FileNames)
  UpdatePlayList()

  updatePlayer()
 End Sub
    Private Sub Form1_FormClosed(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
        ' Dispose of player
        Player = Nothing
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        TrackCol.Width = TrackList.Width - 20
        But_Pause.Enabled = False
  But_Stop.Enabled = False
  files.Clear()
  files.AddRange(FileIO.FileSystem.GetFiles(My.Computer.FileSystem.SpecialDirectories.MyMusic, FileIO.SearchOption.SearchAllSubDirectories, "*.mp3"))
  UpdatePlayList()
  Volume.Value = Player.settings.volume
  Me.Txt_TrackName.Text = Player.URL
  Player.settings.autoStart = False
  ' Added: Check to see if there actual is any tracks to play.
  If TrackList.Items.Count > 0 Then
   Player.URL = files(0)
   GUIMode("Play")
  Else
   GUIMode("Stopped")

  End If
  Player.enableContextMenu = False
  With Me.Timer1
   .Interval = 500
   .Start()
   .Enabled = True
  End With
 End Sub
 Private Sub UpdatePlayList()
  Me.TrackList.Items.Clear()
  For Each a As String In files
   Me.TrackList.Items.Add(FileIO.FileSystem.GetName(a).ToString)
  Next
 End Sub

    Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        ' Form is closing, so shutdown player
        Player.close()
    End Sub

    Private Sub ClickedOnPlayButton(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_Play.Click
        GUIMode("Play")
        updatePlayer()
        Player.controls.play()
    End Sub

    Private Sub ClickedonstopNutton(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_Stop.Click
        Player.controls.stop()
        GUIMode("Stopped")
    End Sub

    Private Sub ClickedonpauseButton(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles But_Pause.Click
        If Player.playState = WMPLib.WMPPlayState.wmppsPaused Then
            GUIMode("Play")
        Else
            GUIMode("Paused")
        End If
    End Sub

    Private Sub GUIMode(ByRef Guimode As String)
        Select Case Guimode
            Case "Play"
                ' Put GUI in playing mode guise
                Player.controls.play()
                But_Pause.BackColor = System.Drawing.SystemColors.Control
                But_Pause.Enabled = True
                But_Stop.Enabled = True
                But_Play.Enabled = True
            Case "Paused"
                ' put gui in paused mode guise
                But_Pause.Enabled = True
                But_Stop.Enabled = False
                But_Play.Enabled = False
                But_Pause.BackColor = PausedTrackColor
                Player.controls.pause()
            Case "Stopped"
                But_Pause.Enabled = False
                But_Stop.Enabled = False

        End Select
    End Sub

    Private Sub ScrollingVolume(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Volume.Scroll
        ' Change the player's volume
        Player.settings.volume = Volume.Value
    End Sub

    Private Sub Player_MediaError(ByVal pMediaObject As Object) Handles Player.MediaError
        MessageBox.Show("Unrecoverable Problem. Shutting Down", "MyMusic Player")
        Me.Close()
    End Sub

    Private Sub Player_PlayStateChange(ByVal NewState As Integer) Handles Player.PlayStateChange
  Static Dim PlayAllowed As Boolean = True
        Select Case CType(NewState, WMPLib.WMPPlayState)
            Case WMPLib.WMPPlayState.wmppsReady
                If PlayAllowed Then
                    Player.controls.play()
                End If
            Case WMPLib.WMPPlayState.wmppsMediaEnded
                ' Reach end of track move onto next, looping around
                PreviouslyPlaying = CurrentPlaying
                CurrentPlaying = (CurrentPlaying + 1) Mod files.Count
                ' Start protection (without it next wouldn't play
                PlayAllowed = False
                ' Play track
                Player.URL = files(CurrentPlaying)
                Player.controls.play()
                ' End Protection
                PlayAllowed = True
                updatePlayer()
        End Select

    End Sub

    Private Sub updatePlayer()
        ' Display track name
        Txt_TrackName.Text = Player.currentMedia.name
        ' Update TrackPostion
        With TrackPosition
            .Minimum = 0
            .Maximum = CInt(Player.currentMedia.duration)
            .Value = CInt(Player.controls.currentPosition())
        End With
        ' Display Current Time Position and Duration
        Txt_Progress.Text = Player.controls.currentPositionString & vbTab & Player.currentMedia.durationString
        ' Set Volume slide to match current volume
        Volume.Value = Player.settings.volume
        ' Is the CurrentPlaying Track No. is different to the Previous Track number.
        If CurrentPlaying <> PreviouslyPlaying Then
            ' Yes, 
            ' Set the forecolor of the corrisponding track, assiociated with the previous playing track, with the control color
            TrackList.Items(PreviouslyPlaying).ForeColor = System.Drawing.SystemColors.ControlText
        End If
        ' Set the forecolor of the corrisponding track, assiociated with the currently playing track, with the current track color
  TrackList.Items(CurrentPlaying).ForeColor = CurrentTrackColor

    End Sub

    Private Sub Tracks_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TrackList.MouseDoubleClick
        GUIMode("Play")

        ' A track in the tracklisting has been double clicked on
        PreviouslyPlaying = CurrentPlaying
        ' Set CurrentPlaying to position of selected track.
        CurrentPlaying = TrackList.SelectedIndices(0)
        ' Play the track
        Player.URL = files(CurrentPlaying)
        updatePlayer()
        Player.controls.play()
    End Sub

    Private Sub ScrollingTrackPosition(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackPosition.Scroll
        ' Seek the through track
        Player.controls.pause()
        Player.controls.currentPosition = TrackPosition.Value
        Player.controls.play()
        updatePlayer()
        ' Allow the app to do some processing
        Application.DoEvents()
    End Sub

    Private Sub UpdatePlayerTimer(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        updatePlayer()
    End Sub

 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Import.Click

 End Sub
End Class



Was This Post Helpful? 0
  • +
  • -

#12 Guest_Jason Charles*


Reputation:

Posted 24 May 2010 - 11:30 AM

Awesome.
It works like a charm now.
thanks
Jason
Was This Post Helpful? 0

#13 Guest_V.noo.B. N.ot.E.nemyT.oo*


Reputation:

Posted 25 August 2010 - 06:39 AM

Thanks for the Program that you want me to DL :D

That is what I am saying earlier in other topic/tutorials:

Post some screen shots or give a link so that guests and users can view and download / run the Programs

Thanks, Dream in Code. :D
Was This Post Helpful? 0

#14 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10185
  • View blog
  • Posts: 37,603
  • Joined: 27-December 08

Posted 25 August 2010 - 06:40 AM

You are more than welcome to copy the code and run it. :)
Was This Post Helpful? 0
  • +
  • -

#15 superhero-man  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 26
  • Joined: 09-April 11

Posted 09 May 2011 - 05:53 PM

Ok ummm, how do i add all the music in the listbox onto a playlist? Im building a music player, but all it needs (for now) is a playlist feature? :offtopic:

Edit: oh nd does anyone know how to pull off the Title, Artist, Album name, and Alum artwork?

Title = in a label
Artist = in a label
Album Name = in a label
Alum Art =in a picturbox

This post has been edited by superhero-man: 09 May 2011 - 05:56 PM

Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2