Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 132,303 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,033 people online right now. Registration is fast and FREE... Join Now!




combo box

 
Reply to this topicStart new topic

combo box

muddasir
post 30 Mar, 2008 - 03:43 AM
Post #1


D.I.C Head

Group Icon
Joined: 14 Jan, 2007
Posts: 96



Thanked 4 times

Dream Kudos: 200
My Contributions


i am using vb6

what i want is i place a combo box on my form add some name to

it

now when we click on combo box on most right (down arrow) a drop

down list apperat showning all the names



can we call this drop down list on any other event like i want when

the user type someting on a combobox the list appears with out clicking it

with mouse.



hope you understand what i mean

thanks
User is offlineProfile CardPM

Go to the top of the page

Martyr2
post 30 Mar, 2008 - 10:28 AM
Post #2


Programming Theoretician

Group Icon
Joined: 18 Apr, 2007
Posts: 5,027



Thanked 173 times

Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions


Not that I know of without creating your own user control and building in that functionality. You can force it to change values though and select items of the list using the ListIndex property...

vb

Private Sub Text1_Change()
Combo1.ListIndex = 2
End Sub


When the user writes something into our textbox it will change the combo to select the 3rd item in the combo and make it the one that is displayed in the top of the combo drop down.

This doesn't reveal the entire list, but this is probably one of the closest ways you are going to get that functionality without creating your own custom control based off of a combobox.

Hopefully that can do something similar to what you are asking about. smile.gif
User is online!Profile CardPM

Go to the top of the page

muddasir
post 31 Mar, 2008 - 01:42 AM
Post #3


D.I.C Head

Group Icon
Joined: 14 Jan, 2007
Posts: 96



Thanked 4 times

Dream Kudos: 200
My Contributions


I think this will clear you my question more
see this combobox pictures

Attached Image

Here in combox at most right of the combox there is
a down arrow (i made a blue box at this)
when we click this with our mouse a list appear
just below (i make red box there).

now i simpley want that this list will appear just
as combox get focus with out clicking it with mouse

hope this clear you more
User is offlineProfile CardPM

Go to the top of the page

mafaisal
post 2 Apr, 2008 - 06:50 AM
Post #4


New D.I.C Head

*
Joined: 2 Mar, 2008
Posts: 7

Hello Mudassir

Use this code
CODE

Private sub Combox1_Gotfocus
sendkeys "{F4}"  
End sub



User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 11/22/08 02:01AM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month