Hi Guys,
I am receiving the error listed on the subject. The error message is pretty obvious, but the question is:
How many items can I add to a ComboBox In my case the number is > 32800....
Do exist any difference depending on the Operating System My App is running on Windows 98.

Combo Box Error - Too Many items in the combo box
Andrew D
Hopefully there is a better way to do what you want.
Don
ianhoc
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
For i As Int32 = 1 To 1000000
ComboBox1.Items.Add("Item " & i.ToString)
Next
End SubAdding a million items took a while, but it worked fine. I tested it on a machine with some 700+ megs of memory. Upon completion, the app took up about 106 megs in memory, according to task manager. I could scroll the list, select items, everything I'd expect, although it was a bit sluggish.
Granted, this is just adding short text strings, so it's taking up minimal memory for each object. What kind of objects are you adding And what kind of memory does the client have
At this point, I would guess that the combobox is smart enough to see that it's running out of resources and surmise that it's because you've added too many items.
So the solution is probably to catch and handle the error, telling the person to hit a sale at Best Buy for more memory, unless you have any additional information about the error. If you do, please post it along with the <i>complete</i> exception message and stack trace.
Don
Jaylou
geometrikal
Okay, I'll see what I can dig up. In the meantime, hopefully someone else has an answer.
Don