Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ComboBox.DropDown in VB 6.0

Status
Not open for further replies.

dpdoug

Programmer
Nov 27, 2002
455
US
I'm converting an Access application to VB 6.0. There is a method in the Access ComboBox control that you can call from the KeyDown Event to cause the list to drop down programatically called DropDown.

How can I get the same effect in VB 6? The ComboBox control in VB 6 doesn't have this method.

David
 
When the combo box has focus, press and hold <alt> and then press the down cursor key. This will open the dropdown box. Thanks and Good Luck!

zemp
 
Thanks for the prompt response. tek-tips will always be my prefered place to get quick answers.
This is how I resolved the problem:

Private Sub cboColHeaders_KeyDown(KeyCode As Integer, Shift As Integer)
Select Case KeyCode
Case vbKeyRight
SendKeys &quot;%{DOWN}&quot;
Case vbKeyLeft
SendKeys &quot;{ESC}&quot;
End Select
End Sub

It worked like a charm!

David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top