CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2000
    Posts
    149

    What is the limit for ListBox entries?

    Hello, I just came across a problem with one of my apps that is leading me to believe that there is a limit to the number of entries I can add to my a file of zip listbox. I read codes into my listbox to sort and dedupe them, but it seems the value cannot be greater than the value of an integer? After the Listcount went ove 32k then the listcount became a negative value.

    Is there a way to change the the values that a listbox can hold?

    Thanks,
    Sean


  2. #2
    Join Date
    Apr 2000
    Location
    Houston, TX, USA
    Posts
    199

    Re: What is the limit for ListBox entries?

    If you are looking to sort, why don't you just use a sorting routine? I doubt Microsoft thought there would ever be a need for more than 32k items inside of a listbox... As to dedupe???? What is that?

    Tim Cartwright 'Will write code for food.
    Sr Systems Architect - Information Systems
    Splitrock Services Inc.
    Tim C.
    //Will write code for food

  3. #3
    Join Date
    Feb 2000
    Posts
    149

    Re: What is the limit for ListBox entries?

    By dedupe I mean get rid of the duplicate entries...

    So there is no way to get more than 32k inside a listbox? My code works great to sort and dedup, it would be a shame to have to start from scratch.


  4. #4
    Join Date
    May 1999
    Posts
    3,332

    Re: What is the limit for ListBox entries?

    in NT you CAN get more than 32 K into a list box.
    The problem is: the ListCount property is of type Integer. The limit for an Integer is around 32 K!

    Thus, you will have problem iterating over your listbox entries using a "for i = 0 to list1.listcount-1" loop.

    Better use a Listview control.




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