C# Label Text Not Updating

前端 未结 7 1802
無奈伤痛
無奈伤痛 2021-01-04 06:16

I have the following code:

private void button1_Click(object sender, EventArgs e)
{
  var answer =
    MessageBox.Show(
      \"Do you wish to submit checked         


        
相关标签:
7条回答
  • 2021-01-04 06:55

    The Label doesn't re-paint until you give the UI thread back to the message loop. Try Label.Refresh, or better yet, try putting your lengthy operation in a background thread as other posters have suggested.

    0 讨论(0)
提交回复
热议问题