谁知道,在VB中用代码实现Combo打开哪个下拉表的??
听说用发送消息可以,可以我这样SendMessage Combo1.hwnd, , 1, 0就是不行,说
参数出错~~~~

解决方案 »

  1.   


    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 = &H14FSub Form_Load()
        Combo1.AddItem "Item 1"
        Combo1.AddItem "Item 2"
        Combo1.AddItem "Item 3"
    End Sub
    Private Sub Command1_Click()
        Dim r As Long
        r = SendMessageLong(Combo1.hwnd, CB_SHOWDROPDOWN, True, 0)
    End Sub
      

  2.   

    如何打开COMBO1的内容显示为向上,而不是向下???
      

  3.   

    自己做控件吧﹐把text,command.list進行組合﹐想向下就向向下﹐想上就上﹐呵呵