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

📄 form1.frm

📁 vb电子书籍
💻 FRM
字号:
   VERSION 5.00
   Begin VB.Form Form1
      Caption         =   "定时程序"
      ClientHeight    =   1485
      ClientLeft      =   60
      ClientTop       =   345
      ClientWidth     =   4965
      LinkTopic       =   "Form1"
      ScaleHeight     =   1485
      ScaleWidth      =   4965
      StartUpPosition =   2  '屏幕中心
      Begin VB.Timer Timer1
         Interval        =   10
         Left            =   120
         Top             =   600
      End
      Begin VB.TextBox Text2
         Height          =   270
         Left            =   2040
         TabIndex        =   6
         Top             =   960
         Width           =   375
      End
      Begin VB.TextBox Text1
         Height          =   270
         Left            =   1200
         TabIndex        =   5
         Top             =   960
         Width           =   375
      End
      Begin VB.CommandButton Command2
         Caption         =   "结束"
         Height          =   375
         Left            =   3480
         TabIndex        =   3
         Top             =   840
         Width           =   855
      End
      Begin VB.CommandButton Command1
         Caption         =   "定时"
         Height          =   375
         Left            =   3480
         TabIndex        =   2
         Top             =   240
         Width           =   855
      End
      Begin VB.Label Label3
         BackStyle       =   0  'Transparent
         BorderStyle     =   1  'Fixed Single
         Height          =   255
         Left            =   1320
         TabIndex        =   4
         Top             =   360
         Width           =   855
      End
      Begin VB.Label Label2
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "定时时间:      时       分"
         Height          =   180
         Left            =   240
         TabIndex        =   1
         Top             =   960
         Width           =   2430
      End
      Begin VB.Label Label1
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "现在时间:"
         Height          =   180
         Left            =   240
         TabIndex        =   0
         Top             =   360
         Width           =   900
      End
   End
   Attribute VB_Name = "Form1"
   Attribute VB_GlobalNameSpace = False
   Attribute VB_Creatable = False
   Attribute VB_PredeclaredId = True
   Attribute VB_Exposed = False
'CODE Manger By BcodeXRose
Dim hour, minute

'##################################################################
'## 过程名称:Command1_Click
'## 参数: 无
'##################################################################
Private Sub Command1_Click()
    hour = Format(Text1.Text, "00")
    minute = Format(Text2.Text, "00")
    
End Sub
    
'##################################################################
'## 过程名称:Command2_Click
'## 参数: 无
'##################################################################
Private Sub Command2_Click()
    End
End Sub
    
'##################################################################
'## 过程名称:Form_Load
'## 参数: 无
'##################################################################
Private Sub Form_Load()
    hour = "**"
    minute = "**"
    
End Sub
    
    
'##################################################################
'## 过程名称:Timer1_Timer
'## 参数: 无
'##################################################################
Private Sub Timer1_Timer()
    Label3.Caption = Time$()
    If Mid$(Time$, 1, 5) = hour + ":" + minute Then
        hou = "**"
        minute = "**"
        MsgBox$ ("时间到!")
    End If
End Sub

⌨️ 快捷键说明

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