Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hey guys

How do I create an auto fill - function for combo-boxes in VB6? Or does VB6 already have such a function?

I appreciate every helpful post. Thanks!


v_tigra
Posted
Comments
Sergey Alexandrovich Kryukov 19-Sep-14 4:26am    
What is that? What should it do? Why would anyone implement such a function for a general purpose library? What's the problem? And finally, are you really so desperate that you have to mess with VB6?
—SA
v_tigra 19-Sep-14 4:40am    
It should just complete the selection in the combo box. Example: I have a list in the combo box (one, two, three, four, five). If I type 'f' -> 'four' should be selected, if I type 'o' -> 'one' should be selected.

I know that nobody use vb6 anymore, but we still use it for very very old tools.

1 solution

There is an example here[^]

It could do with some improvement... e.g. capture the current listindex in the keydown event (if it is not -1) so you can get the "next" match (roll around if not found)

There are other examples using other methods - follow the suggestion from Wes Aday for a google search.

Or change the style of the combobox to 2 - Dropdown list and the user just needs to hit the first character of the option they need ... multiple hits will cycle through matching entries
 
Share this answer
 
Comments
Maciej Los 29-Sep-14 14:15pm    
+5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900