Hi all,
Does anyone know a way to detect if a DataCombo is currently dropped?
Printable View
Hi all,
Does anyone know a way to detect if a DataCombo is currently dropped?
Needs a timer and a combobox.
VB Code:
Option Explicit Private Const CB_GETDROPPEDSTATE As Long = &H157 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 Sub Form_Load() Dim intFN As Integer For intFN = 0 To 25 Combo1.AddItem "Index #" & intFN Next intFN Timer1.Enabled = True Timer1.Interval = 100 End Sub Private Sub Timer1_Timer() Me.Caption = IIf(SendMessage(Combo1.hwnd, CB_GETDROPPEDSTATE, 0, 0), "Listbox is visible.", "Listbox is not visible.") End Sub
Thanks Shawn N, but i'm afraid this doesn't work with the data combo...
Any other ideas?