How Many Rows Can A Listbox Hold? Windows Form Application

后端 未结 3 908
一向
一向 2021-01-28 09:51

I have over 9,00,000 records in my Access database but only a fraction of that is being displayed in the listbox. How Many Rows Can A Listbox Hold? Around 65K is the answer I go

3条回答
  •  借酒劲吻你
    2021-01-28 10:43

    There is a bug in the native listbox control that was introduced at Vista time and is still present in Win7. It prevents you from scrolling properly past 65536 + number of visible items. The most visible part of the bug, beyond not seeing the later items, is the scrollbar thumb jumping back when you drag it to the bottom.

    This bug doesn't get put to the test very often. Nobody ever expects his user to have enough patience to claw through tens of thousands of items. Such a program gets uninstalled quickly. ListBox capacity is otherwise only limited by the amount of available virtual memory. If you really want to pursue this then use ListView or DataGridView.

提交回复
热议问题