Results 1 to 2 of 2

Thread: combobox in dropdown mode after setfocus

  1. #1

    Thread Starter
    Addicted Member c@lle's Avatar
    Join Date
    Oct 1999
    Location
    Belgium
    Posts
    179
    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?

  2. #2
    Guest
    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

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