Article ID: 124058
Article Last Modified on 12/9/2003
' Enter the following two lines as one, single line:
Declare Function SendMessage Lib "User" (ByVal hWnd As Integer,
ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Any) As Long
Const WM_USER = &H400
Const CB_GETDROPPEDSTATE = (WM_USER + 23)
Sub Form_Load ()
combo1.AddItem "item# 1"
combo1.AddItem "item# 2"
combo1.AddItem "item# 3"
combo1.AddItem "item# 4"
End Sub
Sub Combo1_DropDown ()
Timer1.Interval = 1
Timer1.Enabled = True
End Sub
Sub Timer1_Timer ()
status% = SendMessage(Combo1.hWnd, CB_GETDROPPEDSTATE, 0, 0&)
If Not status% Then
'Insert the code for the retraction event here
MsgBox "DropDown List Retracted!"
Timer1.Enabled = False
End If
End Sub
Additional query words: 2.00 3.00 ComboBox
Keywords: KB124058