When the list box is set to multi-select and has a large number of items, finding all the selected items by index is really slow, greater than 4 minutes to find 1 item in a list of 35000. Is there a way to get better performance when checking for the selected items?
Thanks,
Robert,
Do you have a specific code example for what is taking a long time? Have you run a performance profiler against your application to see if there is anything that you can improve the performance of within your code? Do you have example code for what is performing poorly?
Please note that the COM controls have been retired for over ten years and the support that we can provide will be limited.
Of course i understand our code base is over 15 years old (VB6) now so any advice is most appreciated. A small VB6 code sample, is attached that shows the issue.
Load 1515 msSelected: 1, 241844 ms
Robert
The example appears to be looking to get the count of selected items and I believe you could track this manually outside of the Listbox by using the Selected event of the PVListbox and incrementing the count when the PVListBox1.Selected(NewItem) is true and also decreasing the count when PVListBox1.Selected(PreviousItem) is false.
If you need to track the items that are selected, you could also store the indexes externally to the control from this event and use your own list to track what items are selected outside of the listbox.
As far as improving the performance of the Selected property itself, I didn't see a way to do this from the application using the listbox.
Let me know if you have any questions with this matter.