例[6-11].frm

来自「蒋加伏主编VB程序设计第四版PPT及全部课本源码 北京邮电大学出版社 」· FRM 代码 · 共 65 行

FRM
65
字号
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "例[6-11] 复选框的应用"
   ClientHeight    =   2445
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   3495
   LinkTopic       =   "Form1"
   ScaleHeight     =   2445
   ScaleWidth      =   3495
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton C1 
      Caption         =   "兴趣"
      Height          =   495
      Left            =   240
      TabIndex        =   3
      Top             =   1800
      Width           =   1215
   End
   Begin VB.CheckBox Ch3 
      Caption         =   "音乐"
      Height          =   375
      Left            =   1920
      TabIndex        =   2
      Top             =   1560
      Width           =   1335
   End
   Begin VB.CheckBox Ch2 
      Caption         =   "体育"
      Height          =   375
      Left            =   1920
      TabIndex        =   1
      Top             =   1080
      Width           =   1335
   End
   Begin VB.CheckBox Ch1 
      Caption         =   "旅游"
      Height          =   375
      Left            =   1920
      TabIndex        =   0
      Top             =   600
      Width           =   1335
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub C1_Click()
  Dim s As String
  s = "我的兴趣是"
  If Ch1.Value = 1 Then
      s = s + Ch1.Caption
  End If
  If Ch2.Value = 1 Then
      s = s + Ch2.Caption
  End If
  If Ch3.Value = 1 Then
      s = s + Ch3.Caption
  End If
  Cls
  Print s
End Sub

⌨️ 快捷键说明

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