progress bar

C

cj

Another curiosity. Probably can't be done either. If I click on a
progress bar is there a way to determine the value nearest my click
point? Not the value of where the progress is currently but the value
where I clicked.
 
G

Gary Chang[MSFT]

Hi Cj,
If I click on a progress bar is there a way to determine
the value nearest my click point?

How about to handle its MouseUp event, such as:

Private Sub ProgressBar1_MouseUp(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles ProgressBar1.MouseUp
Debug.WriteLine(e.X.ToString)
Debug.WriteLine(e.Y.ToString)
End Sub


Thanks!

Best regards,

Gary Chang
Microsoft Community Support
======================================================
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00
AM PST, February 14, 2006. Please complete a re-registration process by
entering the secure code mmpng2006 when prompted. Once you have entered the
secure code mmpng2006, you will be able to update your profile and access
the partner newsgroups.
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================
 
G

Gary Chang[MSFT]

Hi Cj,
Not the value of where the progress is currently but the value
where I clicked.

If you mean the ProgressBar's value, please refer to the following code
snippet:

Private Sub ProgressBar1_MouseUp(ByVal sender As Object, ByVal e As
System.Windows.Forms.MouseEventArgs) Handles ProgressBar1.MouseUp

Debug.WriteLine(Int(ProgressBar1.Maximum * (e.X /
ProgressBar1.Size.Width)))

End Sub


Wish it works!

Best regards,

Gary Chang
Microsoft Community Support
======================================================
PLEASE NOTE the newsgroup SECURE CODE and PASSWORD will be updated at 9:00
AM PST, February 14, 2006. Please complete a re-registration process by
entering the secure code mmpng2006 when prompted. Once you have entered the
secure code mmpng2006, you will be able to update your profile and access
the partner newsgroups.
======================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top