Library code snippets
Drop Combo
By James Crowley, published on 14 Jul 2001
This code uses the SendMessage API to drop a combo box. Simply add a combo box called cboCombo, and a button named cmdDrop. Note that if you want to close the combo, simply call the SendMessage API using the CB_SHOWDROPDOWN with False instead of True.
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA"
(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As
Long
Private Const CB_SHOWDROPDOWN = &H14F 'WM_USER + 14
Private Sub cmdDrop_Click()
SendMessage cboDrop.hwnd, CB_SHOWDROPDOWN, True, 0
End Sub
Related articles
Related discussion
-
Regarding Visual Basic Programme
by manjunathsl2007 (0 replies)
-
how do you hide all in VB6
by CapnJack (1 replies)
-
Problem with Input File
by novavb6 (3 replies)
-
How to produce a txt file with a table??
by novavb6 (1 replies)
-
VB6 compatability from XP to Vista
by bronx (1 replies)
Can anyone tell me how to automatically drop a datacombo upon get focus? Do I need to use API calls, as well?
this code does not works fine with VB.Net the message is not passed to the control..Can any one help??
SendMessage cbocombo.hwnd, CB_SHOWDROPDOWN, True, 0
it should look like this
This thread is for discussions of Drop Combo.