Use a Timer control, it's UI thread invoked and a control available to you via the Form Designer.
private void Form1_Load(object sender, EventArgs e)
{
Timer timer = new Timer();
timer.Interval = (10 * 1000); // 10 secs
timer.Tick += new EventHandler(timer_Tick);
timer.Start();
}
private void timer_Tick(object sender, EventArgs e)
{
//refresh here...
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…