Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Horizontal Scrollbar problem in VB.NET

Status
Not open for further replies.

sony2000

Programmer
Dec 7, 2003
34
0
0
HK
Hi,

I have a form that containing a horizontal scrollbar and
a textbox controls. I set the min and max properties of
the scrollbar to 0 and 255 respectively, and the smallchange
and largechange properties of the scrollbar are set to
1 and 10. A scroll event of the scrollbar is added so that
the textbox control will display the value of the scrollbar.

But strangely, I scroll it to the most-left position but
the textbox displays only 246....I try many times it
can only display 246 but instead of 255. Does anyone
encounter this problem before? Know any solution to this?

I need to use this scrollbar to control a color property
in the form....so urgently need your advice or fixes.

Thanks for your kind attention,
Raymond
 
Quick and dirty solution

make the max propertie 264.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Hi chrissie1,

Have you encountered this problem before? Is it a bug of
VB.NET?

Raymond
 
Do you have the scroll bar "RightToLeft" property set to true? I'm just wondering because wouldn't the left hand side of the bar be 0 and the right be 255? If so, then it may be some quirk with the what spot on the slider indicated the value, check and see if it returns a negative value on the opposite side. Most likely it wont, but there may be an extended '0' area.

-Rick

----------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top