cmd.frm

来自「vb精彩编程希望大家有用」· FRM 代码 · 共 85 行

FRM
85
字号
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   2865
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   3585
   LinkTopic       =   "Form1"
   ScaleHeight     =   2865
   ScaleWidth      =   3585
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "按钮3"
      Height          =   495
      Index           =   2
      Left            =   480
      TabIndex        =   2
      Top             =   1800
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "按钮2"
      Height          =   495
      Index           =   1
      Left            =   480
      TabIndex        =   1
      Top             =   1080
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "按钮1"
      Height          =   495
      Index           =   0
      Left            =   480
      TabIndex        =   0
      Top             =   360
      Width           =   1215
   End
   Begin VB.Label Label3 
      Height          =   255
      Left            =   1920
      TabIndex        =   5
      Top             =   1920
      Width           =   1215
   End
   Begin VB.Label Label2 
      Height          =   255
      Left            =   1920
      TabIndex        =   4
      Top             =   1200
      Width           =   1215
   End
   Begin VB.Label Label1 
      Height          =   255
      Left            =   1920
      TabIndex        =   3
      Top             =   480
      Width           =   1215
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click(Index As Integer)
    Select Case Index + 1
    Case 1
        Label1.Visible = True
        Label1.Caption = "单击了按钮1"
        Label2.Visible = False
        Label3.Visible = False
    Case 2
        Label2.Visible = True
        Label2.Caption = "单击了按钮2"
        Label1.Visible = False
        Label3.Visible = False
    Case 3
        Label3.Visible = True
        Label3.Caption = "单击了按钮3"
        Label1.Visible = False
        Label2.Visible = False
    End Select
End Sub

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?