编写一个图形:
   用VB写一个点围着一个圆运动的程序,测试测试自己!

解决方案 »

  1.   

    Option Explicit
    Dim j As DoublePrivate Sub Form_Load()
        Me.AutoRedraw = True
        Me.ScaleMode = 3
        Timer1.Interval = 100
        Timer1.Enabled = True
    End SubPrivate Sub Timer1_Timer()
        Dim cx As Long
        Dim cy As Long
        cx = Me.Width / 30
        cy = Me.Height / 30
        
        Cls
        Circle (cx, cy), 100, vbRed
        Circle (cx + 100 * Cos(j), cy - 100 * Sin(j)), 2, vbBlue
        j = j + 0.05
    End Sub
      

  2.   

    呵呵,图片就更简单了哦
    Option Explicit
    Dim j As DoublePrivate Sub Form_Load()
        Me.AutoRedraw = True
        Me.ScaleMode = 3
        Timer1.Interval = 100
        Timer1.Enabled = True
    End SubPrivate Sub Timer1_Timer()
        Dim cx As Long
        Dim cy As Long
        cx = Me.Width / 30
        cy = Me.Height / 30
        
        Cls
        Circle (cx, cy), 100, vbRed
        Picture1.left=cx + 100 * Cos(j)
        Picture1.top=cy - 100 * Sin(j)
        j = j + 0.05
    End Sub