I have got a very simple video player wrote using Visual Basic 2010.

I have embedded the windows media player into the app without the controls.

Right now it has simple play, pause and open buttons that work with wmp .

Can anyone explain how to make a slider that corresponds to the normal sliders in video Players ?

Thanks in advance

I Use Window Media Player Control
And Change Setting

Player.uiMode = "full"

in form load

I'm trying to make this player easy to use with a touchscreen PC with just a play , stop , and next/back, button. Plus this slider. So I have the ui hidden for the other over-sized buttons.


Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As _ System.EventArgs) Handles TrackBar1.Scroll
Dim Value as Double
Dim Duration as Double = AxWindowsMediaPlayer1.currentMedia.duration
Value = (TrackBar1.Value / TrackBar1.Max) * Duration
Player.Ctlcontrols.currentPosition = Value
End Sub

It is in a Second Length Not Percent
Double type Value

Player.Ctlcontrols.currentPosition = TimeLength

Property To Set or Get Value
From Player
To Get The Full Length Of Media