كنترل تايمر با نام tmrDraw و Interval=500 و Enabled=False وفرم با نام frmDraw و BorderStyle=0 و WindowState=2 و BackColor=0 مي باشد.

كد برنامه :

Option Explicit

Const PI As Double = 3.14159265358979

Dim CX As Integer, CY As Integer 'CX and CY are X and Y of Center point

Dim I As Double

Private Sub Form_Click()

    End

End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

    If KeyCode = 27 Then End

End Sub

 

Private Sub Form_Load()

    Start

    tmrDraw.Enabled = True

End Sub

Private Sub tmrDraw_Timer()

    If I = 0.0000001 Then Me.Cls

    Circle (CX, CY), 2000, QBColor(Int(Rnd * 6 + 9)), -I, -(I + PI / 6)

    PSet (CX + 1000 * Cos(I + PI / 12), CY + 1000 * (-Sin(I + PI / 12))), QBColor(15)

    Circle (CurrentX, CurrentY), 200, QBColor(Int(Rnd * 6 + 9))

    I = I + PI / 3

    If I > 2 * PI Then Start

End Sub

 

Private Sub Start()

    I = 0.0000001

    Randomize Timer

    CX = Int(Rnd * (Me.Width - 5000) + 2500)

    CY = Int(Rnd * (Me.Height - 5000) + 3000)

End Sub

توضيحات مربوط به رويدادها و ... در سري بعد . قبل از خداحافظي كامنت يادت نره !!