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

📄 v6j07-08闹钟.frm

📁 这是一个小闹钟的小程序的设计
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "闹钟"
   ClientHeight    =   2040
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4665
   LinkTopic       =   "Form1"
   ScaleHeight     =   2040
   ScaleWidth      =   4665
   StartUpPosition =   3  '窗口缺省
   Begin VB.Timer Timer1 
      Interval        =   10
      Left            =   360
      Top             =   1440
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   2280
      MaxLength       =   2
      TabIndex        =   4
      Text            =   "Text2"
      Top             =   960
      Width           =   735
   End
   Begin VB.TextBox Text1 
      Height          =   390
      Left            =   1200
      MaxLength       =   2
      TabIndex        =   3
      Text            =   "Text1"
      Top             =   945
      Width           =   735
   End
   Begin VB.CommandButton Command3 
      Caption         =   "结束"
      Height          =   375
      Left            =   3480
      TabIndex        =   2
      Top             =   1440
      Width           =   975
   End
   Begin VB.CommandButton Command2 
      Caption         =   "停止"
      Height          =   375
      Left            =   3480
      TabIndex        =   1
      Top             =   840
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "定时"
      Height          =   375
      Left            =   3480
      TabIndex        =   0
      Top             =   240
      Width           =   975
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "分"
      Height          =   180
      Left            =   3120
      TabIndex        =   9
      Top             =   1080
      Width           =   180
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "时"
      Height          =   180
      Left            =   2040
      TabIndex        =   8
      Top             =   1080
      Width           =   180
   End
   Begin VB.Label Label1 
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Label3"
      Height          =   375
      Left            =   1200
      TabIndex        =   7
      Top             =   360
      Width           =   1095
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "定时时间:"
      Height          =   180
      Left            =   240
      TabIndex        =   6
      Top             =   1080
      Width           =   900
   End
   Begin VB.Label Label11 
      AutoSize        =   -1  'True
      Caption         =   "现在时间:"
      Height          =   180
      Left            =   240
      TabIndex        =   5
      Top             =   480
      Width           =   900
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


    Dim hour, minute
    Sub Command1_Click()
        hour = Format(Text1.Text, "00")
        minute = Format(Text2.Text, "00")
    End Sub


    Sub Timer1_Timer()
        Label1.Caption = Time$()
        If Mid$(Time$, 1, 5) = hour + ":" + minute Then
            For i = 1 To 100
                Beep
            Next i
        End If
    End Sub

    Sub Command2_Click()
        hour = "**"
        minute = "**"
    End Sub

    Sub Command3_Click()
        End
    End Sub



⌨️ 快捷键说明

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