VBNotebook Home | Functions | Combo Box Dropdown/Rollup
This routine drops or rolls up combo dropdown portion - True to drop down, False to roll up.
First, In General|Declarations....
__________________________________________________________________________________________
'
' Constants
'
Private Const CB_SHOWDROPDOWN = &H14F
'
' API Calls
'
Private Declare Function SendMessageByNum Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Long, ByVal wMsg As Long, _
ByVal wParam As Long, ByVal lParam As Long) As Long
__________________________________________________________________________________________
And the routine itself....
__________________________________________________________________________________________
Sub SetComboDropDown(cboCombo As ComboBox, ByVal bDown As Boolean)
Dim nRet As Long
nRet = SendMessageByNum(cboCombo.hwnd, CB_SHOWDROPDOWN, bDown, 0)
End Sub
__________________________________________________________________________________________
Copyright 2000-2005, J. Frank Carr