⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 向combobox发送消息.frm

📁 通过API向ComboBox控件发送接受消息产生相应事件
💻 FRM
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -