views:

1171

answers:

3

Is it possible to use the default ComboBox control under VB6 to make it a smart ComboBox? We suppose that the values are already populated in the ComboBox. For example:

New Delhi
New World
New York

We need the ComboBox to respond to one of the default events, so when for example the user writes 'N' the value in the ComboBox will be the first Value starting by 'N'. In our case it's New Delhi and then the user can continue typing till they write the exact word or he writes something different. This technique is very used in web Application (for example in Google when you put the first word you will get a droped down list containing the suggestions). But how to do that in VB6 :-(

In case its not possible, how can we keep the ComboBox droped down, the values changes when the text in the comboBox change and the first element in the ComboBox correspond to the first word starting by the value entered by the user?

Thanks a lot.

+2  A: 

Actually I found an easy solution :) thanks to FreeVbCode uder Forms&Contorls Tab. There is a control named AutoControl. We can use it easly for our requirement.

http://www.freevbcode.com/ShowCode.Asp?ID=5944

Thanks.

Dreamer57
+2  A: 

You might also want to look at this control from vbAccelerator.com, which supports auto-completion. The vbAccelerator code is usually high quality. Of course you're introducing quite a dependency into your code whenever you use a third-party control.

MarkJ
A: 

Blockquote

Actually I found an easy solution :) thanks to FreeVbCode uder Forms&Contorls Tab. There is a control named AutoControl. We can use it easly for our requirement.

http://www.freevbcode.com/ShowCode.Asp?ID=5944

Thanks.

Blockquote

thank you this is im looking