我有一个 WinForms 程序,其中包含 a 、button
astatusStrip
和 a toolStripStatusLabel
。statusStrip
如果我单击按钮并运行:
private void button1_Click(object sender, EventArgs e)
{
toolStripStatusLabel1.Text = "Test";
System.Threading.Thread.Sleep(5000);
}
然后toolStripStatusLabel
' 的文本直到线程完成睡眠后才会更新。如何让它立即更新,然后让线程休眠?