Click to See Complete Forum and Search --> : Scroolbar range more than 64k
Charu
May 24th, 2001, 10:39 PM
I want to increase the range of scrollbar 'value ' property. In my application i am displaying labels . As scrollbar scrolls , next label gets displayed on next line. (I am mapping one scrollbar value to one label.) I am handling Scrollbar_Change event in which I display the next label.
In this fashion i can display 64k labels as the scrollbar value property is of integer type .
I want to display more than 64k labels. For that i want to increase the range of scroll bar.How can i increase the range?.
charusheela
shree
May 25th, 2001, 07:29 AM
You are using > 16K labels to scroll text? You'd better use a text box.
Or you can use a picturebox and its Print method to display the text.
If you are still not satisfied, and want to stick to the current method, you can double the number of labels by accessing the labels as Label1(2 * Vscroll1.value) and Label1(2 * Vscroll1.value + 1) but this way, you'll be scrolling two lines at a time.
sfieldho
May 25th, 2001, 01:53 PM
Using the VB scroll bar control you can't get past the +-32K limit because the Max property is presented as an integer. We recently had this problem at work - below is a snippet of an email sent between our programmers...
I have found an answer to the problem with the Max property of the Scroll Bar control being held as an integer. Go to www.vbAccelerator.com and do a Search for "scroll bars". This will take you to the Code Library section and position you on the cScrollBar class which directly manipulates the Win32 in-built scroll bars where all the numeric properties are held as longs. Cool, eh?
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.