Home All Groups Group Topic Archive Search About
Author
6 Feb 2006 9:12 PM
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.

Author
7 Feb 2006 7:17 AM
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.
======================================================
Author
7 Feb 2006 7:27 AM
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.
======================================================