Aprire
un combo-box con l'evento focus
Public Const CB_GETDROPPEDSTATE As long =&H157
Public Const CB_SHOWDROPDOWN As Long=&H14F
Declare Function SendMessageAsLong Lib "user32"Alias "SendMessageA"(
ByVal hWnd As Long,
ByVal wMsg As Long, ByVal wParam As Long,ByVal lParam As Long) As Long
Dim bAperto As Boolean 'cmbautomatico rappresenta il nome del combo-box
bAperto=SendMessageAsLong(cmbAutomatico.hWnd,CB_GETDROPPEDSTATE,0,0)<>0
If not bAperto then
SendMessageAsLong cmbAutomatico.hWnd, CB_SHOWDROPDOWN,1,0
End If |