向combobox发送消息.frm
来自「个人VB学习源码精选,自己学习时的一些编程小程序,希望对大家有帮助」· FRM 代码 · 共 53 行
FRM
53 行
VERSION 5.00
Begin VB.Form Form1
Caption = "以程序拉下或收起ComBox的示例"
ClientHeight = 1800
ClientLeft = 60
ClientTop = 345
ClientWidth = 4125
LinkTopic = "Form1"
ScaleHeight = 1800
ScaleWidth = 4125
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command2
Caption = "收起ComboBox"
Height = 375
Left = 1920
TabIndex = 2
Top = 840
Width = 1815
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "向ComboBox发送消息.frx":0000
Left = 240
List = "向ComboBox发送消息.frx":0184
TabIndex = 1
Text = "Abs"
Top = 240
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "拉下ComboBox"
Height = 375
Left = 1920
TabIndex = 0
Top = 240
Width = 1815
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
SendMessage Combo1.hwnd, CB_SHOWDROPDOWN, True, ByVal 0&
End Sub
Private Sub Command2_Click()
SendMessage Combo1.hwnd, CB_SHOWDROPDOWN, False, ByVal 0&
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?