How to implement a "seekable" progress bar?
I'm building a media player control, and right now I have a progress bar showing as the file plays... that part works fine. What I want to do is add a "seek" feature, just like what you see in most media players... click on the progress bar and it jumps to that point in the seekable media stream. I can do the seeking part myself, I just need to know how to implement the user interface. As far as I can tell, the ProgressBar doesn't support this, and I don't see another .NET control that would.
Re: How to implement a "seekable" progress bar?
progressbar has got a mousedown event
Code:
Private Sub Form1_Load(sender As Object, e As System.EventArgs) Handles Me.Load
With ProgressBar1
.Maximum = .Width
.Style = ProgressBarStyle.Continuous
End With
End Sub
Private Sub ProgressBar1_MouseDown(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles ProgressBar1.MouseDown
ProgressBar1.Value = e.X + 1
ProgressBar1.Value = e.X
End Sub