在你提供的代码上改了一下,蛮好玩的。其实你已经基本上完成了,只需再循环带入颜色就OK了。不必搞什么API
另外要注意变量声明必须每个都要写As,原来那种Pascal式的声明等于没写,VB会都认为是
Variant,只有最后一个是Integer,也算基本概念啦。加入一个command和一个timer。Option Explicit
Const pi As Single = 3.1415926
Private x1 As Integer, x2 As Integer, y1 As Integer, y2 As IntegerPrivate Sub Command1_Click()
  Timer1.Enabled = Not Timer1.Enabled
End SubPrivate Sub Form_Load()
  x1 = -100: y1 = -100
  x2 = 100: y2 = 100
  Picture1.Scale (x1, y1)-(x2, y2)
  Picture1.FillStyle = 0
  Timer1.Interval = 250
End SubSub DrawColor()
  Dim i As Integer, c1 As Integer, c2 As Integer
  Static n As Integer
  Dim angel As Single, startpoint As Single, endpoint As Single  startpoint = -0.001
  angel = 45 / 360 * pi * 2
  n = n Mod 8
  For i = 1 To 8
    endpoint = startpoint - angel
    c1 = (n + i) Mod 8 + 1
    c2 = (n + 9 - i) Mod 8 + 1
    If i <> 8 Then
      Picture1.FillColor = QBColor(c1)
      Picture1.Circle (0, 0), 100, , startpoint, endpoint
      Picture1.FillColor = QBColor(c2)
      Picture1.Circle (0, 0), 80, , startpoint, endpoint
      Picture1.FillColor = QBColor(i)
      Picture1.Circle (0, 0), 60, , startpoint, endpoint
      Picture1.FillColor = QBColor(15)
      Picture1.Circle (0, 0), 40, , startpoint, endpoint
    Else
      Picture1.FillColor = QBColor(c1)
      Picture1.Circle (0, 0), 100, , startpoint, -0.001
      Picture1.FillColor = QBColor(c2)
      Picture1.Circle (0, 0), 80, , startpoint, -0.001
      Picture1.FillColor = QBColor(i)
      Picture1.Circle (0, 0), 60, , startpoint, -0.001
      Picture1.FillColor = QBColor(15)
      Picture1.Circle (0, 0), 40, , startpoint, -0.001
    End If
    startpoint = endpoint 
  Next i
  n = n + 1
End SubPrivate Sub Timer1_Timer()
  DrawColor
End Sub