pro_vb thread: how to overcome overflow error of using more than 32767 items in vb list box....
>Is there any easy way to overcome this.... any pointers... Help...
yes, blame it to Microsoft that thinks we are still in a 16-bits world :)
I have that problem myself, in almost all controls (MSFlexGrid included)
But there is an argument for this: the Integer parameter limits the
programmer to flood the computer memory. If you have a lot of data
to be displayed, better to do it in 'chuncks'. For examples, if you
query a database and get 32gazillions of records, it is not a good idea
to keep all them in memory...
This is what I do. I create a list (or a flex grid, or whatever),
I limit the number of elements to only the ones that are displayed and
I add a scrollbar to the right. In the scrollbar event, I read the
data starting from the new start point (based on the position of
the scrollbar) and I re-populate the list. A little painful, but
I do not see any other solution. Besides, as I said, that keeping
too much data in memory is not a good idea. And I am not the only
one to use this tecnique (I saw it used in VBPJ, I do not remember
the situation)
Regards,
Marco