|
Private Sub Form_Load()
AutoRedraw = True
BorderStyle = 0
Top = 0
Left = 0
Width = Screen.Width
Height = Screen.Height
r1 = Width / 6
r2 = Width / 12
ww = Width / 4
hh = Height / 4
Rem draw the red block
Line (0, 0)-(Width, Height), RGB(255, 0, 0), BF
Rem draw the blue block
Line (0, 0)-(Width / 2, Height / 2), RGB(0, 0, 255), BF
Rem draw the 12 light
DrawWidth = 2
For j = 0 To 30
r1 = r1 - 4 * j
r2 = r2 - 4 * j
For i = 1 To 12
theta = i * 6.283 / 12
X1 = ww + r1 * Cos(theta)
Y1 = hh + r1 * Sin(theta)
X2 = ww + r2 * Cos(theta + 6.283 / 24)
Y2 = hh + r2 * Sin(theta + 6.283 / 24)
X3 = ww + r1 * Cos(theta + 6.283 / 12)
Y3 = hh + r1 * Sin(theta + 6.283 / 12)
Line (X1, Y1)-(X2, Y2), RGB(255, 255, 255)
Line (X2, Y2)-(X3, Y3), RGB(255, 255, 255)
Next i
Next j
Rem draw the circle
FillColor = RGB(255, 255, 255)
FillStyle = 0
DrawWidth = Width / 1200
Circle (ww, hh), hh / 2, RGB(0, 0, 255)
End Sub
本文於 修改第 1 次
|