📄 frmtaskbar.frm
字号:
End
Begin VB.Label Label12
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "5"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000C000&
Height = 315
Left = 2160
TabIndex = 6
Top = 2280
Width = 195
End
Begin VB.Label Label11
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "4"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00008000&
Height = 315
Left = 2760
TabIndex = 5
Top = 1800
Width = 195
End
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "3"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFF00&
Height = 315
Left = 2760
TabIndex = 4
Top = 1200
Width = 195
End
Begin VB.Label Label10
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "2"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C0C000&
Height = 315
Left = 2760
TabIndex = 3
Top = 480
Width = 195
End
Begin VB.Label Label9
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "1"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00808000&
Height = 315
Left = 2160
TabIndex = 2
Top = 0
Width = 195
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "12"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 315
Left = 1200
TabIndex = 1
Top = 0
Width = 375
End
Begin VB.Label lblTime
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "lblTime"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H0000FF00&
Height = 255
Left = 1080
TabIndex = 0
Top = 600
Width = 855
End
Begin 射频卡考勤系统.Form_TaskBar Form_TaskBar1
Left = 360
Top = 2160
_ExtentX = 2143
_ExtentY = 661
End
End
Attribute VB_Name = "FrmTaskBar"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private LastMinute As Integer
Private LastHour As Integer
Private lastx As Integer
Private lasty As Integer
Private Sub Form_TaskBar_StartOpenUp()
tmrUpdateTime.Enabled = True
tmrUpdateTime.Interval = 1000
End Sub
Private Sub Form_TaskBar_EndCloseUp()
tmrUpdateTime.Enabled = False
End Sub
Private Sub asPopup1_Click(Cancel As Boolean)
FrmMaim.Show
End Sub
Private Sub asPopup2_Click(Cancel As Boolean)
FrmUser.Show
End Sub
Private Sub asPopup3_Click(Cancel As Boolean)
Dim err As Integer
If Data1.Recordset("COM2") = 0 Then
err = MCS_InitComm(0, 115200)
If err <> 0 Then
MsgBox "串口初始化错误!" & "出错信息"
Exit Sub
End If
End If
If Data1.Recordset("COM1") = 0 Then
err = MCS_InitComm(1, 115200)
If err <> 0 Then
MsgBox "串口初始化错误!" & "出错信息"
Exit Sub
End If
End If
MCS_LED (1)
If err <> 0 Then
MsgBox "读写器LED错误!" & "出错信息"
err = MCS_ExitComm()
Exit Sub
End If
err = MCS_ExitComm()
If err <> 0 Then
MsgBox "关闭串口错误!" & "出错信息"
Exit Sub
End If
MsgBox "设备正确安装,可以正常使用。"
End Sub
Private Sub asPopup4_Click(Cancel As Boolean)
Unload FrmMaim
Unload FrmSet
Unload FrmPrint
Unload FrmMonth
Unload Me
End Sub
Private Sub Form_Initialize()
If App.PrevInstance Then
MsgBox "本程序正在运行,这个副本将自动结束!"
End
End If
End Sub
Private Sub Form_Load()
Data1.Visible = False
lastx = 999
Data1.DatabaseName = App.Path & "\公司员工考勤库.mdb"
End Sub
Private Sub Timer1_Timer()
Const pi = 3.141592653
Dim T
Dim X As Integer
Dim Y As Integer
Dim H, lastx, lasty As Integer
Dim SEC, Min, HR, lastMin As Date
Dim red As String
T = Now
SEC = Second(T)
Min = Minute(T)
HR = Hour(T)
Me.Scale (-16, 16)-(16, -16)
If Min <> lastMin Or HR <> LastHour Then
LastMinute = Min
LastHour = HR
Me.Cls
lastx = 999
Me.DrawWidth = 2
Me.DrawMode = 13
H = HR + pi / 60
X = 5 * Sin(H * pi / 6)
Y = 5 * Cos(H * pi / 6)
Me.Line (0, 0)-(X, Y)
X = 8 * Sin(Min * pi / 30)
Y = 8 * Cos(Min * pi / 30)
Me.Line (0, 0)-(X, Y)
Me.DrawWidth = 1
End If
Me.DrawMode = 10
red = RGB(255, 0, 0)
X = 10 * Sin(SEC * pi / 30)
Y = 10 * Cos(SEC * pi / 30)
If lastx <> 999 Then
Me.Line (0, 0)-(lastx, lasty), red
End If
Me.Line (0, 0)-(X, Y), red
lastx = X
lasty = Y
End Sub
Private Sub tmrUpdateTime_Timer()
lblTime.Caption = Format(Now, "long time")
End Sub
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -