CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2001
    Location
    pune
    Posts
    6

    Scroolbar range more than 64k

    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

  2. #2
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: Scroolbar range more than 64k

    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.


  3. #3
    Join Date
    May 2001
    Location
    London
    Posts
    4

    Re: Scroolbar range more than 64k

    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?




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured