Answered by:
wmp trackbar

Question
-
Hi all
I am trying to figure out how to make a trackbar move in sync with my wmp player
cannot figure out the duration setting....
I would also like to make a volume trackbar....
any help appreciated
dim duration as string = wmp.currentmedia.duration.......???????
Me
.TrackBar2.BackColor = Color.LavenderBlush Me.TrackBar2.Location = New System.Drawing.Point(0, 130) Me.TrackBar2.Margin = New System.Windows.Forms.Padding(3, 3, 3, 1) Me.TrackBar2.Maximum = 100 Me.TrackBar2.Name = "TrackBar2" Me.TrackBar2.Size = New System.Drawing.Size(358, 10) 'Me.TrackBar2.TabIndex = 13 Me.TrackBar2.TickFrequency = 1 Me.TrackBar2.TickStyle = System.Windows.Forms.TickStyle.NneMe.TrackBar2.Value = ???????
tia
Thursday, August 30, 2007 7:50 AM
Answers
-
Like this maybe with trackbar2 min = 0 and max = 100 and maybe the value in the designer at 50 to start .
Code SnippetTrackBar1.Maximum = player.currentMedia.duration
TrackBar1.Value = player.Ctlcontrols.currentPosition
tracklabel.Text = TrackBar1.Maximum - TrackBar1.Value
player.settings.volume = TrackBar2.Value
End SubThursday, August 30, 2007 10:54 AM -
thanks bdbodger
I done it this way
Private
Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scrollwmp.settings.volume = TrackBar1.Value
End Sub..........................................................
TrackBar1.Minimum = 0
TrackBar1.Maximum = 100TrackBar1.Value = wmp.settings.volume
end sub
this seems to work nicely
cheers
Thursday, August 30, 2007 11:39 AM -
Thursday, August 30, 2007 12:41 PM
All replies
-
Why not using the progress bar
it's easier
Thursday, August 30, 2007 8:14 AM -
thanks omar, but I want trackbarThursday, August 30, 2007 8:19 AM
-
ok...I figured out the duration....working great
just need the volume trackbar now
any help welcome
tia
Thursday, August 30, 2007 9:15 AM -
I think you must make your own control that's better !Thursday, August 30, 2007 10:09 AM
-
Like this maybe with trackbar2 min = 0 and max = 100 and maybe the value in the designer at 50 to start .
Code SnippetTrackBar1.Maximum = player.currentMedia.duration
TrackBar1.Value = player.Ctlcontrols.currentPosition
tracklabel.Text = TrackBar1.Maximum - TrackBar1.Value
player.settings.volume = TrackBar2.Value
End SubThursday, August 30, 2007 10:54 AM -
thanks bdbodger
I done it this way
Private
Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scrollwmp.settings.volume = TrackBar1.Value
End Sub..........................................................
TrackBar1.Minimum = 0
TrackBar1.Maximum = 100TrackBar1.Value = wmp.settings.volume
end sub
this seems to work nicely
cheers
Thursday, August 30, 2007 11:39 AM -
Thursday, August 30, 2007 12:41 PM
-
yeah, I got ya
I just added it in there as this timer sets the play mode and other stuff
thanks for the help
cheers
Thursday, August 30, 2007 1:06 PM