"Eps" <ep*@mailinator.comwrote in message
news:uW**************@TK2MSFTNGP04.phx.gbl...
I am trying to use the progress bar to represent the playing of a mp3, I
guess its a bit of a hack to try and allow the user to change the value of
a progressbar by clicking with the mouse, not what the progress bar is
for.
I am sure there is some maths i could do to get an approximate value using
the X position of the mouse cursor, so I will look in to that.
yeah, you could do that with some simple arithmetic using x,y .. pixel
length of the progress bar, etc ... should work ..; meanwhile, you might
look at doing it with the TrackBar control, which is designed to get input
values along a continuous range ... but it doesn't have quite the same
aesthetics to it ...
thing with this is that I don't think I'd want a discrete click to trigger
changes in the value of the Prog Bar; imo, I think you really want to use
the MouseMove event .. the problem you need to solve there is that the mouse
does not have to be down for the event to fire, which is bound to lead to
unintended changes in track position
I think it'll be a little tough with progress bar because the player (WMP??)
will not likely respond immediately to the calculated change in track
position; you need to defer the re-positioning of the track until the user
has stopped "turning the dial" .. like maybe wait 300 ms until a track
position change is effected
L