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

📄 form1.frm

📁 简单的秒表制作,稍加修改就可以制作自己要的功能.
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   5970
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   6750
   LinkTopic       =   "Form1"
   ScaleHeight     =   5970
   ScaleWidth      =   6750
   StartUpPosition =   3  'Windows Default
   Begin VB.Timer Timer1 
      Left            =   1560
      Top             =   4800
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Command2"
      Height          =   375
      Left            =   3600
      TabIndex        =   1
      Top             =   960
      Width           =   1455
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   375
      Left            =   1200
      TabIndex        =   0
      Top             =   960
      Width           =   1335
   End
   Begin VB.Label Label1 
      Caption         =   "Label1"
      Height          =   855
      Left            =   1200
      TabIndex        =   2
      Top             =   3000
      Width           =   3615
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim m As Integer, s As Integer, ms As Integer, flag As Boolean
Private Sub Command1_Click()
If flag = False Then
Timer1.Interval = 10
flag = True
Else
Timer1.Interval = 0
flag = False
End If
End Sub

Private Sub Command2_Click()
flag = False
Timer1.Interval = 0
m = 0
s = 0
ms = 0
Label1.Caption = "00:00:00"
End Sub

Private Sub Timer1_Timer()
ms = ms + 1
If ms = 100 Then
s = s + 1
ms = 0
End If
If s = 60 Then
m = m + 1
s = 0
End If
Label1.Caption = Format(m, "00:") & Format(s, "00:") & Format(ms, "00")
End Sub

⌨️ 快捷键说明

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