📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form form1
BackColor = &H00E0E0E0&
Caption = "Form1"
ClientHeight = 5850
ClientLeft = 60
ClientTop = 345
ClientWidth = 8175
ForeColor = &H80000011&
LinkTopic = "Form1"
LockControls = -1 'True
Picture = "Form1.frx":0000
ScaleHeight = 5850
ScaleWidth = 8175
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command7
Caption = "模式选择"
Height = 375
Left = 6000
TabIndex = 7
Top = 2040
Width = 1095
End
Begin VB.CommandButton Command8
Caption = "系统介绍"
Height = 375
Left = 6000
TabIndex = 6
Top = 2640
Width = 1095
End
Begin VB.PictureBox Picture1
AutoRedraw = -1 'True
AutoSize = -1 'True
BackColor = &H00FFFFFF&
BorderStyle = 0 'None
FillColor = &H00808080&
ForeColor = &H00808080&
Height = 3960
Left = 3120
Picture = "Form1.frx":CC6C
ScaleHeight = 3960
ScaleWidth = 2085
TabIndex = 4
Top = 1200
Width = 2085
Begin VB.Timer Timer1
Interval = 200
Left = 720
Top = 2040
End
Begin VB.Line Line3
BorderColor = &H000000C0&
X1 = 920
X2 = 920
Y1 = 1560
Y2 = 1860
End
Begin VB.Line Line2
BorderColor = &H00FF0000&
X1 = 920
X2 = 920
Y1 = 1440
Y2 = 1860
End
Begin VB.Line Line1
BorderColor = &H000080FF&
X1 = 920
X2 = 920
Y1 = 1320
Y2 = 1860
End
Begin VB.Label Label1
BackColor = &H00FFFFFF&
Height = 195
Left = 1290
TabIndex = 5
Top = 1800
Width = 195
End
End
Begin VB.CommandButton Command5
BackColor = &H00E0E0E0&
Caption = "退出"
Height = 375
Left = 6000
TabIndex = 3
Top = 3840
Width = 1095
End
Begin VB.CommandButton Command4
Caption = "开/关声音"
Height = 375
Left = 6000
TabIndex = 2
Top = 1440
Width = 1095
End
Begin VB.CommandButton Command3
BackColor = &H8000000D&
Caption = "隐藏界面"
Height = 375
Left = 6000
TabIndex = 1
Top = 840
Width = 1095
End
Begin VB.CommandButton Command2
BackColor = &H00C0E0FF&
Caption = "响铃设置"
Height = 375
Left = 6000
TabIndex = 0
Top = 3240
Width = 1095
End
End
Attribute VB_Name = "form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public htoday As Boolean, alc As Integer
Dim ts As Integer, closewave As Boolean
Private Sub Command1_Click()
Call controlpanels("rundll32.exe shell32.dll,Control_RunDLL timedate.cpl")
Me.WindowState = 1
End Sub
Private Sub Command2_Click()
frmLogin.Show
Me.WindowState = 1
End Sub
Private Sub Command3_Click()
Form2.Show
Me.Hide
End Sub
Private Sub Command4_Click()
If closewave = False Then
closewave = True
Else
closewave = False
End If
End Sub
Private Sub Command5_Click()
End
End Sub
Private Sub Command6_Click()
closewave = True
End Sub
Private Sub Command7_Click()
Me.WindowState = 1
Form4.Show
End Sub
Private Sub Command8_Click()
frmSplash.Show
Me.WindowState = 1
End Sub
Private Sub Form_Load()
Call PutWindowOnTop(form1)
Picture1.Height = 3120
Picture1.Width = 1845
form1.Height = 5000
form1.Width = 8000
closewave = False
Label1.Caption = Right(Format(Now, "yy-mm-dd"), 2)
htoday = False
Dim a As Integer, b As Integer, c As Integer
Dim inputdata As String
Open App.Path + "\forever.dat" For Input As 1
On Error Resume Next
Do While Not EOF(1)
Line Input #1, inputdata
Select Case typetime(inputdata)
Case 1
Clockf(a) = Mid$(inputdata, 5)
a = a + 1
Case 3
Alertft(b) = Mid$(inputdata, 5, 5)
alertfms(b) = Mid$(inputdata, 10)
b = b + 1
Case 4
If Mid$(inputdata, 11, 8) = Format(Now, "yy-mm-dd") Then
htoday = True
Alertot(c) = Mid$(inputdata, 5, 5)
alertoda(c) = Mid$(inputdata, 11, 8)
alertoms(c) = Mid$(inputdata, 19)
c = c + 1
End If
End Select
Loop
alc = c - 1
Close #1
End Sub
Public Sub controlpanels(filename As String)
Dim rtn As Double
On Error Resume Next
rtn = Shell(filename, 5)
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ToolTipText = Format(Now, "yyyy年mm月dd日hh:mm")
End Sub
Private Sub Picture1_Click()
End Sub
Private Sub Timer1_Timer()
Call timemove(Format(Time$, "hh:mm:ss"))
ts = ts + 1
If ts = 5 Then
If closewave = False Then
k = App.Path + "\clock.wav"
l = &H1 Or &H2
i = sndPlaySound(k, l)
End If
ts = 0
End If
For i = 0 To 50
If Alertft(i) = Format(Time$, "hh:mm") Then
MsgBox alertfms(i), vbOKOnly + vbInformation + vbApplicationModal, "每日定时提醒"
Alertft(i) = "hh:mm"
End If
If Clockf(i) = Format(Time$, "hh:mm") Then
Clockf(i) = "hh:mm"
ts = -10
k = App.Path + "\Cuckoo.wav"
l = &H1 Or &H2
i = sndPlaySound(k, l)
ElseIf clockn(i) = Format(Time$, "hh:mm") Then
clockn(i) = "hh:mm"
ts = -10
k = App.Path + "\Cuckoo.wav"
l = &H1 Or &H2
i = sndPlaySound(k, l)
End If
Next i
If htoday = True Then
For i = 0 To alc
If Alertot(i) = Format(Time$, "hh:mm") Then
MsgBox alertoms(i), vbOKOnly + vbInformation + vbApplicationModal, "提醒你"
Alertot(i) = "hh:mm"
End If
Next i
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -