timei里的程序怎么写?我用picturebox的BackColor来表示颜色的,5秒变换一次。请快

解决方案 »

  1.   

    Private Sub Form_Load()
        Timer1.Interval = 5000
        Timer1.Enabled = True
        Picture1.Tag = 0
    End SubPrivate Sub Timer1_Timer()
        If Picture1.Tag = 0 Then
            Picture1.BackColor = vbYellow
            Picture1.Tag = 1
        Else
            Picture1.BackColor = vbRed
            Picture1.Tag = 0
        End If
    End Sub