views:

36

answers:

2

Hello!

i am making a music player in winforms. i have a progress bar and when i click on a position along the progress bar, i want to get the int for that position ( from 1 to 100 , i.e. for when i want to get to a certain point in my song ) . How can i do that ?

Regards, Alexandru Badescu

A: 

Well you could use a picturebox to simulate a progress bar ... have a method to partially fill it based on current progress, and wire up the MouseDown event (this will provide you with the mouse position which you can then scale accordingly).

ptrevor
+2  A: 

Use TrackBar control, and this is may an advance one, I hope it helps you.

Good luck.

Homam
Thanks ! i'll try it first thing in the morning !
Badescu Alexandru
:@Badescu Alexandru: Welcome, but don't forget to give my answer the accept if it works ;) :D, good luck!
Homam