3分钟给你把第二题写好了,拖一个Timer1和Label控件,把Label1的AutoSize设为False,文字清空,然后拖成一个方块形状。
Public Class Form1
Dim T As Integer
Dim D As Integer
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Timer1.Enabled = True
Timer1.Interval = 100
Label1.BackColor = Color.Red
D = 1
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
T += 1
If T >= 300 And D = 1 Then T = 0 : D = 2 : Label1.BackColor = Color.Green
If T >= 300 And D = 2 Then T = 0 : D = 3 : Label1.BackColor = Color.Yellow
If T >= 30 And D = 3 Then T = 0 : D = 1 : Label1.BackColor = Color.Red
End Sub
End Class
是什么时候要呢?