打铃.frm

来自「VB源码,是初学者的福因.让你很快掌握VB编程」· FRM 代码 · 共 46 行

FRM
46
字号
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   1620
   ClientLeft      =   60
   ClientTop       =   390
   ClientWidth     =   3930
   LinkTopic       =   "Form1"
   ScaleHeight     =   1620
   ScaleWidth      =   3930
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "启动打铃系统"
      Height          =   615
      Left            =   840
      TabIndex        =   0
      Top             =   360
      Width           =   1695
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
 Sub Beeping(n As Integer)
     Dim i As Integer
     Dim j As Integer
     For i = 1 To n
         Beep
         For j = 1 To 10000
         Next j
     Next i
 End Sub
 
Private Sub Command1_Click()
Dim Mytime As Date
   Mytime = Time
   If Mytime = "11:30:00" Or Mytime = "17:30:00" Then
        Call Beeping(5)
       MsgBox "该下班了!快走吧!"
   End If
End Sub


⌨️ 快捷键说明

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