说三道四技术文摘-感悟人生的经典句子
说三道四 > 文档快照

显示 Combo 的下拉条 -VB资料

HTML文档下载 WORD文档下载 PDF文档下载
显示 Combo 的下拉条 -VB资料

声明:
Public 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
Public Const CB_SHOWDROPDOWN = &H14F
使用:
'程序控制显示下拉条
r = SendMessageLong(Combo1.hWnd, CB_SHOWDROPDOWN, True, 0)
'程序控制隐藏下拉条
r = SendMessageLong(Combo1.hWnd, CB_SHOWDROPDOWN, False, 0)

确定 TextBox 有几行
声明:
Public 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
Public Const EM_GETLINECOUNT = &HBA
使用:
lineCount = SendMessageLong(Text1.hwnd, EM_GETLINECOUNT, 0&, 0&)

TextBox 中英文输入方法切换 98-7-22
IMEMode 属性可以方便地控制输入方法:
Text1.IMEMode = 0 '初始值
Text1.IMEMode = 1 '中文输入
Text1.IMEMode = 2 '英文输入
Text1.IMEMode = 3 '禁止中文输入
备案号:鲁ICP备13029499号-2 说三道四 www.s3d4.cn 说三道四技术文摘