//Add actual text to the console public void AddBuildFileText(string text) { if (Console.InvokeRequired) { AddBuildFileTextCallback d = new AddBuildFileTextCallback(AddBuildFileText); Invoke(d, new object[] { text }); } else { //int start = BuildFile.TextLength; BuildFile.Text += text + "\n"; BuildFile.ScrollToCaret(); //int end = BuildFile.TextLength; // now longer by length of appended text //SyntaxHighlightBuildFileText(start, end, text); } }