Private Sub Command1_Click()
' Timer1.Enabled = ?
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
Private Sub Form_Load()
left0 = Shape1.Left
End Sub
Private Sub Timer1_Timer()
If Shape1.FillColor = blue_color Then
If Shape1.Left > 0 Then
Shape1.Height = Shape1.Height + 100
Shape1.Width = Shape1.Width + 100
Shape1.Left = Shape1.Left - 50
Shape1.Top = Shape1.Top - 50
Else
' Shape1.FillColor = ?
Shape1.FillColor = red_color
End If
End If
If Shape1.FillColor = red_color Then
If Shape1.Left < left0 Then
Shape1.Height = Shape1.Height - 100
Shape1.Width = Shape1.Width - 100
' ? = Shape1.Left + 50
Shape1.Left = Shape1.Left + 50
' ? = Shape1.Top + 50
Shape1.Top = Shape1.Top + 50
Else
' Shape1.FillColor = ?
Shape1.FillColor = blue_color
End If
End If
End Sub