CSDN博客

img lang_csdn

Combo下拉列表框自动展开和关闭!

发表于2004/10/13 20:13:00  1851人阅读

分类: VB6.0

'当获得焦点的时候,combo自动下拉
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 Const CB_SHOWDROPDOWN = &H14F

Private Sub BoxDropDown(box As ComboBox, Optional blnIf As Boolean)
'功    能    :    当获得焦点的时候,combo自动下拉
'参    数    :    Box Combo对像    blnIf=True 打开列表 blnIf=False 关闭列表
  SendMessage Combo1.hwnd, &H14F, blnIf, 0
End Sub

阅读全文
0 0

相关文章推荐

img
取 消
img