PictureBox1.BackColor = Color.GreenYellow PictureBox1.Refresh() 'PictureBox1を再描画させる System.Threading.Thread.Sleep(200) PictureBox1.BackColor = Color.Gold
'TimerのIntervalを200に設定すれば200msごとに背景色が変化する Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If PictureBox1.BackColor = Color.GreenYellow Then '背景色がGreenYellowならGoldに変更 PictureBox1.BackColor = Color.Gold Else '背景色がGreenYellowではないならGreenYellowに変更 PictureBox1.BackColor = Color.GreenYellow End If End Sub