【正文】
完整的源程序Const PI = Dim BaseX As Integer, BaseY As Integer, R As IntegerPrivate Sub Command1_Click() = True MsgBox 請(qǐng)輸入要修改的時(shí)間,輸入的數(shù)字必須符合時(shí)間格式 End SubPrivate Sub Command2_Click()EndEnd SubPrivate Sub Command3_Click()End SubPrivate Sub Command4_Click()Time() = = End SubPrivate Sub Form_Load() = 3 = 5505 = 5475End SubPrivate Sub biaopan()Dim i As IntegerBaseX = / 2BaseY = / 2If BaseX BaseY Then R = BaseX * If BaseX BaseY Then R = BaseY * For i = 0 To 360 Step 6If i Mod 30 = 0 Then = 2 DrawLine BaseX + (R 3) * Sin(i * PI / 180), BaseY (R 3) * Cos(i * PI / 180), BaseX + (R 8) * Sin(i * PI / 180), BaseY (R 8) * Cos(i * PI / 180), 3 Else: (BaseX + (R 3) * Sin(i * PI / 180), BaseY (R 3) * Cos(i * PI / 180)), vbBlue End If Next i = 1 (BaseX, BaseY), R, vbRedEnd SubPrivate Sub DrawClock()Dim S As IntegerDim M As IntegerDim H As IntegerS = DatePart(s, Time)M = DatePart(n, Time)H = DatePart(h, Time)If H 12 ThenH = H 12End If = 1DrawLine BaseX, BaseY, BaseX + (R 10) * Sin(S * PI / 30), BaseY (R 10) * Cos(S * PI /