vb农历公历转换系统设计 第6页
Timer3.Enabled = True
Timer4.Enabled = False
End Sub
Private Sub Picture5_Click()
Pt.Visible = False
Timer6.Enabled = True
Timer5.Enabled = False
Timer1.Enabled = True
Timer8.Enabled = False
End Sub
Private Sub Picture5_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case 13
cmdPM_Click
Case 48, 49, 50, 51, 52, 53, 54, 55, 56, 57
cmdNum_Click (KeyAscii - 48)
Case 46
cmdPt_Click
Case 42
cmdOp_Click (2)
Case 43
cmdOp_Click (0)
Case 45
cmdOp_Click (1)
Case 47
cmdOp_Click (3)
Case Else
KeyAscii = 0
End Select
End Sub
Private Sub Picture8_Click()
Picture8.Visible = False
End Sub
Private Sub Pt_Click()
Timer6.Enabled = True
Timer5.Enabled = False
Pt.Visible = False
Timer1.Enabled = True
Timer8.Enabled = False
End Sub
Private Sub Text1_Change()
txt_Sub
s_Disp
End Sub
Private Sub Text2_Change()
txt_Sub
If (Val(Text3.Text) > UpDown3.Max) Then
Text3.Text = Str(UpDown3.Max)
End If
s_Disp
End Sub
Private Sub Text3_Change()
s_Disp
End Sub
Private Sub Timer1_Timer()
Dim textTime As String, h As Integer, m As Integer, s As Integer
Dim hh As String, mm As String, ss As String, zIs As Integer
fhHour = Hour(Now)
fhMin = Minute(Now)
fhSec = Second(Now)
If (fhHour Mod 2) = 1 Then
zIs = (fhHour + 1) / 2
Else
If fhHour = 0 Then
zIs = 12
Else
zIs = fhHour / 2
End If
End If
G_z.Caption = ziShi + Zhi(zIs - 1) + "时"
If (fhHour < 10) Then
fhHour1 = 0
fhHour2 = fhHour
Else
fhHour1 = Int(fhHour / 10)
fhHour2 = fhHour - fhHour1 * 10
End If
If (fhMin < 10) Then
fhMin1 = 0
fhMin2 = fhMin
Else
fhMin1 = Int(fhMin / 10)
fhMin2 = fhMin - fhMin1 * 10
End If
If (fhSec < 10) Then
fhSec1 = 0
fhSec2 = fhSec
Else
fhSec1 = Int(fhSec / 10)
fhSec2 = fhSec - fhSec1 * 10
End If
ShowNum wPw1(color_index), C_clock, fhHour1, color1, 1
ShowNum wPw1(color_index), C_clock, fhHour2, color1, 2
ShowNum wPw1(color_index), C_clock, fhMin1, color1, 4
ShowNum wPw1(color_index), C_clock, fhMin2, color1, 5
ShowNumS wPw2(color_index), SecP, fhSec1 + 1, color1, 2
ShowNumS wPw2(color_index), SecP, fhSec2 + 1, color1, 3
ShowNum wPw1(color_index), C_clock, 10, color1, 3
If flAge = True Then
ShowNumS wPw2(color_index), SecP, 0, color1, 1
flAge = False
Else
ShowNumS wPw2(color_index), SecP, 11, color1, 1
flAge = True
End If
End Sub
Private Sub Timer2_Timer()
Dim fhsec4, fhsec5
If (fhSec3 < 10) Then
fhsec4 = 0
fhsec5 = fhSec3
Else
fhsec4 = Int(fhSec3 / 10)
fhsec5 = fhSec3 - fhsec4 * 10
End If
ShowNumS wPw2(color_index), mSecP, fhsec4 + 1, color1, 1
ShowNumS wPw2(color_index), mSecP, fhsec5 + 1, color1, 2
If fhSec3 > 99 Then
fhSec3 = 0
Else
fhSec3 = fhSec3 + 1
End If
End Sub
Private Sub Timer8_Timer()
Dim ss
L1.X1 = 234 + 5 * Sin(6 * Second(Now) * Pi / 180)
L1.Y1 = 21 - 5 * Cos(6 * Second(Now) * Pi / 180)
L1.X2 = 234 + 18 * Sin(6 * Second(Now) * Pi / 180)
L1.Y2 = 21 - 18 * Cos(6 * Second(Now) * Pi / 180)
L2.X1 = 234 - 2 * Sin(6 * Minute(Time) * Pi / 180)
L2.Y1 = 21 + 2 * Cos(6 * Minute(Time) * Pi / 180)
上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 下一页