秒表1.frm

来自「原创的简朴的秒表」· FRM 代码 · 共 70 行

FRM
70 行
字号
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3840
   ClientLeft      =   60
   ClientTop       =   510
   ClientWidth     =   4380
   LinkTopic       =   "Form1"
   ScaleHeight     =   3840
   ScaleWidth      =   4380
   StartUpPosition =   3  '窗口缺省
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   1000
      Left            =   1560
      Top             =   2040
   End
   Begin VB.CommandButton Command2 
      Caption         =   "结束"
      Height          =   615
      Left            =   2400
      TabIndex        =   3
      Top             =   2760
      Width           =   1335
   End
   Begin VB.CommandButton Command1 
      Caption         =   "开始"
      Height          =   615
      Left            =   480
      TabIndex        =   2
      Top             =   2760
      Width           =   1335
   End
   Begin VB.TextBox Text1 
      Height          =   735
      Left            =   1440
      TabIndex        =   0
      Text            =   "Text1"
      Top             =   600
      Width           =   2175
   End
   Begin VB.Label Label1 
      Caption         =   "时间"
      Height          =   735
      Left            =   360
      TabIndex        =   1
      Top             =   600
      Width           =   855
   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()
Text1.Text = "0"
Timer1.Enabled = True

End Sub

Private Sub Command2_Click()
Timer1.Enabled = False
End Sub

Private Sub Timer1_Timer()

Text1.Text = Val(Text1.Text) + 1
End Sub

⌨️ 快捷键说明

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