Solved

Clone a ComboBox in VB6

Posted on 2008-11-02
7
417 Views
Last Modified: 2013-12-20
I have a form with 20 comboboxes, all of the have the same information, i am full them with a query result, but my question is, is there a way i can clone one of the (the first)? and i don´t have to loop trought all in order to fill the 20 comboboxes.
0
Comment
Question by:emviruena
  • 4
  • 3
7 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22863050
why not fill them "at once" instead of filling them 1 by 1?
you could of course "copy" all the items of the first into all the others, but why loop several times?
0
 

Author Comment

by:emviruena
ID: 22863058
i fill them "at once", but still be so slow.
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22863080
how many items are there in the lists?
can you show the relevant code?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:emviruena
ID: 22863095
The list is result of a query, they are almost 1000 items.
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 22863170
>they are almost 1000 items.

well, that's 2 problems at once.
first of all, that WILL take some time to be loaded: in total 20K items...

secondly, and that's the primary problem: as a user, I would HATE software that let's me choose among 1000 items in a drop-down list !!!!!
much more user-friendly would be some alternative solution, like a filtering text-box, where after typing for example 1-2 characters, the combo/list will fill only those items that match that list. a popup-form would also be nice there...

anyhow, did you already check what part takes the most time, the query, the looping or the filling? what are the timings, btw?

tip: hide the combo box controls while filling, that might help a bit.
0
 

Author Comment

by:emviruena
ID: 22863293
In fact i am take some of the recomendations you are send me, at last, do you thing there is a way to clone the combobox and its items?  thanks.
0
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 22863324
>do you thing there is a way to clone the combobox and its items?
none that I am aware of...
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question