Results 1 to 3 of 3

Thread: Detect if a Combo box is currently dropped?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2002
    Location
    SE England
    Posts
    732

    Detect if a Combo box is currently dropped?

    Hi all,

    Does anyone know a way to detect if a DataCombo is currently dropped?
    Leather Face is comin...


    MCSD

  2. #2
    Frenzied Member Shawn N's Avatar
    Join Date
    Dec 2001
    Location
    Houston
    Posts
    1,631
    Needs a timer and a combobox.

    VB Code:
    1. Option Explicit
    2. Private Const CB_GETDROPPEDSTATE As Long = &H157
    3.  
    4. Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" ( _
    5.      ByVal hwnd As Long, _
    6.      ByVal wMsg As Long, _
    7.      ByVal wParam As Long, _
    8.      lParam As Any) As Long
    9.  
    10.  
    11.  
    12. Private Sub Form_Load()
    13.  
    14.     Dim intFN As Integer
    15.     For intFN = 0 To 25
    16.         Combo1.AddItem "Index #" & intFN
    17.     Next intFN
    18.    
    19.     Timer1.Enabled = True
    20.     Timer1.Interval = 100
    21. End Sub
    22.  
    23. Private Sub Timer1_Timer()
    24.  
    25.     Me.Caption = IIf(SendMessage(Combo1.hwnd, CB_GETDROPPEDSTATE, 0, 0), "Listbox is visible.", "Listbox is not visible.")
    26.    
    27. End Sub
    Please rate my post.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2002
    Location
    SE England
    Posts
    732
    Thanks Shawn N, but i'm afraid this doesn't work with the data combo...

    Any other ideas?
    Leather Face is comin...


    MCSD

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width