能动的

解决方案 »

  1.   

    Option Explicit
    Const PI = 3.1415926
    Dim H As Integer
    Dim M As Integer
    Dim S As Integer
    Dim P As Double
    Private Sub Command1_Click()
      Me.DrawWidth = 1
      Me.FillStyle = 0
      Me.FillColor = QBColor(14)
      Me.Circle (3000, 3000), 2000, QBColor(6)  Me.DrawWidth = 3
      Dim i As Integer  For i = 1 To 60
         Line (3000 + 2000 * Cos(i / 60 * 2 * PI), 3000 + 2000 * Sin(i / 60 * 2 * PI))- _
         (3000 + 1900 * Cos(i / 60 * 2 * PI), 3000 + 1900 * Sin(i / 60 * 2 * PI)), QBColor(15)
      Next i  For i = 1 To 12
         Line (3000 + 2000 * Cos(i / 12 * 2 * PI), 3000 + 2000 * Sin(i / 12 * 2 * PI))- _
         (3000 + 1800 * Cos(i / 12 * 2 * PI), 3000 + 1800 * Sin(i / 12 * 2 * PI))
      Next i  Me.DrawWidth = 8
      Me.PSet (3000, 3000), QBColor(2)
      
      Me.FontSize = 18
      Me.CurrentX = 2840
      Me.CurrentY = 600
      Me.Print "12"
      
      Me.CurrentX = 5050
      Me.CurrentY = 2800
      Me.Print "3"
      
      Me.CurrentX = 2940
      Me.CurrentY = 5000
      Me.Print "6"
      
      Me.CurrentX = 700
      Me.CurrentY = 2800
      Me.Print "9"
      
      
    End SubPrivate Sub Form_Load()
      Command1.Visible = False
    End SubPrivate Sub Timer1_Timer()
      Me.Cls  Call Command1_Click
      Me.DrawWidth = 3
      H = Hour(Time)
      If H > 12 Then H = H - 12
      M = Minute(Time)
      S = Second(Time)
      P = M / 60 * PI / 6
      Me.DrawWidth = 4
      Line (3000, 3000)-(3000 + 800 * Cos((12 - H) * PI / 6 + PI / 2 - P), 3000 - 1000 * Sin((12 - H) * PI / 6 + PI / 2 - P)), QBColor(6)
      Me.DrawWidth = 3
      Line (3000, 3000)-(3000 + 1200 * Cos((60 - M) * PI / 30 + PI / 2 - PI / 30), 3000 - 1300 * Sin((60 - M) * PI / 30 + PI / 2 - PI / 30)), QBColor(8)
      Me.DrawWidth = 2
      Line (3000, 3000)-(3000 + 1500 * Cos((60 - S) * PI / 30 + PI / 2 - PI / 30), 3000 - 1500 * Sin((60 - S) * PI / 30 + PI / 2 - PI / 30)), QBColor(10)
      Me.DrawWidth = 8
      Me.PSet (3000, 3000), QBColor(2)
      
    End Sub
      

  2.   

    在窗体上画三根线用来显示分钟妙,12个label手动显示时钟1,2.....12
    Private Sub Timer1_Timer()
    Form1.Caption = Timesdeg = Second(Time) * 6
    mdeg = Minute(Time) * 6
    hdeg = Hour(Time) * 6' Second Hand
    srad = (3.14 / 180) * sdeg
    Line2.X1 = Line2.X2 + (90 * Sin(srad))
    Line2.Y1 = Line2.Y2 - (90 * Cos(srad))' Minute Hand
    mrad = (3.14 / 180) * mdeg
    Line1.X1 = (80 * Sin(mrad)) + Line1.X2
    Line1.Y1 = Line1.Y2 - (80 * Cos(mrad))' Hour Hand
    hdeg = Hour(Time) * 30 + (0.5 * Minute(Time))
    hrad = (3.14 / 180) * hdeg
    Line3.X1 = (65 * Sin(hrad)) + Line3.X2
    Line3.Y1 = Line3.Y2 - (65 * Cos(hrad))
    End Sub
      

  3.   

    可惜我来晚了^_^,再定义三个变量,"记住"上一次的时间(时分秒),
    到点,先用亮黄色(14)以老的时分秒画线,在....。这样CPU会比较喜欢:)