QUOTE(hayt777 @ 28 May, 2009 - 04:09 AM)

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
CODE
Const CONST_AutoPlayFirst As Boolean = False
Alter Form Load
CODE
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
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.