My Objective maintains logical records row by row using the RichtextBox control. But I worry that when the lines reach a certain point, my window shape will be hung or unloaded from memory.
Can someone show me how I can prevent this, I mean, maybe limit 300 lines using FIFO or 500 lines and then empty and update again. However, I am not sure how to implement this.
void WriteLog(string txt)
{
richTextBox1.AppendText(txt + Environment.NewLine);
richTextBox1.HideSelection = false;
richTextBox1.SelectionStart = richTextBox1.Text.Length;
}
Kelly source
share