-
if i do a 'setfocus' on a combobox, how can i display this combobox in the drop down mode (the same way like you clicked on the little arrow).
The purpose is the following: the user clicks on an arrow, i position the combobox and then i want it to expand, so that is seems that the arrow was the combobox itself.
any suggestion?
-
Try this:
Code:
Private Declare Function SendMessageLong Lib _
"user32" Alias "SendMessageA" _
(ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long) As Long
Private Const CB_SHOWDROPDOWN = &H14F
Private Sub Command1_Click()
SendMessageLong Combo1.hWnd, CB_SHOWDROPDOWN, True, 0
End Sub
Private Sub Command2_Click()
SendMessageLong Combo1.hWnd, CB_SHOWDROPDOWN, False, 0
End Sub