回覆列表
  • 1 # 使用者7305050034042

    "控制元件一個shape1,一個timer1

    Private Sub Form_Load()

    Timer1.Interval = 100

    Timer1.Enabled = True

    Shape1.Shape = 3

    Shape1.BackStyle = 1

    Shape1.BackColor = vbGreen

    End Sub

    Private Sub Timer1_Timer()

    Static n As Integer

    Shape1.BackStyle = 1

    Select Case n

    Case 1 To 50

    Shape1.BackColor = vbGreen

    Case 51 To 80, 131 To 160

    If n Mod 2 = 1 Then

    Shape1.BackColor = vbYellow

    Else

    Shape1.BackStyle = 0

    End If

    If n = 160 Then n = 0

    Case 81 To 130

    Shape1.BackColor = vbRed

    End Select

    n = n + 1

    End Sub

  • 中秋節和大豐收的關聯?
  • 林詩雨這個名字多少分?