CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    how many items can a list hold?

    i have made a program which finds all primes between any two given numbers, and finds out if a number is prime or not... The primes between two numbers are put in a listbox. How many items can a listbox hold? I can find out all primes between 1 and 200,000, but not between 1 and 1,000,000 -- it returns 'INVALID PROCEDURE CALL'. What is wrong? Is it because there will be too many items in the listbox? Is there a way around it?
    And please answer how many items can be put in a listbox....


  2. #2
    Join Date
    Jan 2000
    Location
    Colorado
    Posts
    9

    Re: how many items can a list hold?

    32767 last time I checked. You should be using a grid, or load the answers a chunk at a time. As the user requests to move down unload a chunk at the top and load the next set. This route gives you much faster results since it doesn't have to finish the whole thing before allowing the user to browse the answers.


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