我試圖更新我的Windows Forms應用程序中的狀態條,但沒有顯示任何內容。這裏是我的代碼:如何在Windows窗體中更新StatusStrip
private void textBox1_TextChanged(object sender, EventArgs e)
{
lines = Regex.Split(textBox1.Text.Trim(), "\r\n");
lineCount = lines.Count();
statusStrip1.Text = "Lines: " + lineCount;
statusStrip1.Refresh();
}
Update'*** StatusStrip ***''多線程'需要** InvokeRequired **或_TPL Tasks_,*恕我直言*。 – Kiquenet