Please support our VB.NET advertiser: Programming Forums
Views: 2951 | Replies: 11
![]() |
•
•
Join Date: Jul 2007
Posts: 24
Reputation:
Rep Power: 2
Solved Threads: 0
Hello
I'm writing my first ever VB program. I'm using 2 combo boxes to allow the user to select 2 different pieces of information. Is there any way that I can make my program automaticaly open the first combo box up at startup so the user can easily see what they should be doing. At the moment at startup both combo boxes look like empty text boxes until the user clicks on one of them and then the box opens up. I would like to remove the need to click on the first box at startup.
Thanks you you help
Simon
I'm writing my first ever VB program. I'm using 2 combo boxes to allow the user to select 2 different pieces of information. Is there any way that I can make my program automaticaly open the first combo box up at startup so the user can easily see what they should be doing. At the moment at startup both combo boxes look like empty text boxes until the user clicks on one of them and then the box opens up. I would like to remove the need to click on the first box at startup.
Thanks you you help
Simon
•
•
Join Date: Dec 2002
Location: West Virginia
Posts: 412
Reputation:
Rep Power: 6
Solved Threads: 45
•
•
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,468
Reputation:
Rep Power: 4
Solved Threads: 88
•
•
Join Date: Feb 2007
Location: Bangalore,India
Posts: 1,468
Reputation:
Rep Power: 4
Solved Threads: 88
•
•
Join Date: Dec 2002
Location: West Virginia
Posts: 412
Reputation:
Rep Power: 6
Solved Threads: 45
Hi,
Wrie this code in Got focus event of combo box:
This will open up the drop down list
Regards
Veena
Wrie this code in Got focus event of combo box:
PrivateSub ComboBox1_GotFocus(ByVal sender AsObject, ByVal e As System.EventArgs) Handles ComboBox1.GotFocus SendKeys.Send("%{down}") End Sub
This will open up the drop down list
Regards
Veena
Last edited by QVeen72 : Jul 29th, 2007 at 9:22 am.
•
•
Join Date: Jul 2007
Posts: 24
Reputation:
Rep Power: 2
Solved Threads: 0
•
•
•
•
Hi,
Wrie this code in Got focus event of combo box:
PrivateSub ComboBox1_GotFocus(ByVal sender AsObject, ByVal e As System.EventArgs) Handles ComboBox1.GotFocus SendKeys.Send("%{down}") End Sub
This will open up the drop down list
Regards
Veena
sending %{DOWN} which I think is sending Alt + the down arrow key does not seem to do anything. Lucky all the items in my selection box all start with an open bracket so by sending that it opens up the box for me. I can see why %{DOWN} should work but I cant get it to work
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)






Linear Mode