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

📄 form1.frm

📁 这里有很多很实用的VB编程案例,方便大家学习VB.
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "单选钮和检查框"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   3810
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   3810
   StartUpPosition =   3  '窗口缺省
   Begin VB.CheckBox Check1 
      Caption         =   "选项6"
      Height          =   495
      Index           =   2
      Left            =   1680
      TabIndex        =   5
      Top             =   1080
      Width           =   1215
   End
   Begin VB.CheckBox Check1 
      Caption         =   "选项5"
      Height          =   495
      Index           =   1
      Left            =   1680
      TabIndex        =   4
      Top             =   480
      Width           =   1215
   End
   Begin VB.CheckBox Check1 
      Caption         =   "选项4"
      Height          =   495
      Index           =   0
      Left            =   1680
      TabIndex        =   3
      Top             =   0
      Width           =   1215
   End
   Begin VB.OptionButton Option1 
      Caption         =   "选项3"
      Height          =   495
      Index           =   2
      Left            =   240
      TabIndex        =   2
      Top             =   1080
      Width           =   1215
   End
   Begin VB.OptionButton Option1 
      Caption         =   "选项2"
      Height          =   495
      Index           =   1
      Left            =   240
      TabIndex        =   1
      Top             =   480
      Width           =   1215
   End
   Begin VB.OptionButton Option1 
      Caption         =   "选项1"
      Height          =   495
      Index           =   0
      Left            =   240
      TabIndex        =   0
      Top             =   0
      Width           =   1215
   End
   Begin VB.Label Label2 
      Caption         =   "Label2"
      Height          =   855
      Left            =   240
      TabIndex        =   7
      Top             =   2280
      Width           =   2895
   End
   Begin VB.Label Label1 
      Caption         =   "Label1"
      Height          =   375
      Left            =   240
      TabIndex        =   6
      Top             =   1800
      Width           =   2775
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Check1_Click(Index As Integer)
    k = ""
    For i = 0 To 2
        If Check1(i).Value = 1 Then
            k = k & Check1(i).Caption & " "
        End If
    Next i
    k = "你选择了" & k
    Label2.Caption = k
End Sub

Private Sub Option1_Click(Index As Integer)
    For i = 0 To 2
        If Option1(Index).Value = True Then
            Label1.Caption = "你选择了" & Option1(Index).Caption
        End If
    Next i
End Sub

⌨️ 快捷键说明

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