Page 1 of 1

Media Player Help * Locked

Posted: Tue Dec 29, 2009 12:58 pm
by tvs praveen
Hi, How to make Play Next, Play Previous, Shuffle, And audio mute code

Please help me clapper;

This problem has been solved by CodeNStuff wahooo;

Re: HI, ANYONE KNOW TO CREATE SOME SIMPLE FEATURES

Posted: Wed Dec 30, 2009 12:59 am
by CodenStuff
Hello,

You could use the followin to do what you need.

To repeat media:
Code: Select all
 AxWindowsMediaPlayer1.settings.setMode("loop", True)


Stop repeat:
Code: Select all
 AxWindowsMediaPlayer1.settings.setMode("loop", False)
Play next media:
Code: Select all
AxWindowsMediaPlayer1.Ctlcontrols.next()
To "shuffle" media in a listbox I guess you could use this to select a random item from it:
Code: Select all
Dim TrackRandom As Integer
            TrackRandom = Int((ListBox1.Items.Count) * Rnd())
            AxWindowsMediaPlayer1.URL = (ListBox1.Items(TrackRandom))
You will need to add some of your own code to make it play a random track automatically when the player stops playing or something like that. Im not sure what you mean by preview :?

Happy coding cooll;

Re: HI, ANYONE KNOW TO CREATE SOME SIMPLE FEATURES

Posted: Wed Dec 30, 2009 9:55 pm
by Lewis
I think he means a little snippet of the song, so they know before they play or something? But in a snippit you could Like Put media play and also start a timer with intervel of 5000 (5 seconds) and in the timer put the code stop the audio and stop the timer, i will just put that into code now :D

Re: HI, ANYONE KNOW TO CREATE SOME SIMPLE FEATURES

Posted: Sun Jan 03, 2010 7:15 pm
by Coden
Here is 2 simpel codes.

Add a track bar, set value to 5.
Code;
AxWindowsMediaPlayer1.settings.Volume = Trackbar1.Value

Add CheckBox, set Checked to false.
Code;
If Checkbox1.checked = true then
AxWindowsMediaPlayer1.settings.mute
else
'Do Nothing
End if

regards.