Click to See Complete Forum and Search --> : how many items can a list hold?


January 8th, 2000, 09:19 PM
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....

jaredy
January 10th, 2000, 09:32 PM
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.