public void Output(string text, string category) { RichTextBox rtbOutput = (RichTextBox)frmMain.ActiveForm.Controls["rtbOutput"]; rtbOutput.SelectionStart = rtbOutput.Text.Length; rtbOutput.SelectionColor = Color.Black; rtbOutput.SelectionFont = new Font(rtbOutput.Font, FontStyle.Regular); rtbOutput.SelectedText = "Status: " + category + " : " + text + Environment.NewLine; rtbOutput.ScrollToCaret(); }