使用timer控件,
其Interval属性代表触发时间间隔(1000=1秒),
timer1_Tick事件每隔Interval个时间单位就被触发一次。
(需要先将Enable属性设置为True)
设置好Interval的值,再在timer1-Tick事件中写好相应代码即可。