textbox or other control that has immediate update for scrolling messages

Is there a setting for the textbox control or another control that will allow me to write lines to the textbox and have the data show up instantly? My application would be from within a while loop and I want the lines to show up as they are processed, not at the end of the loop. Ex.

while(foo == true) {
textBox1.text = msg;
msg = getNextMsg();
}

[364 byte] By [wgillin] at [2007-12-16]
# 1
Add this line, Application.DoEvents() in you loop.

while(foo == true) {
textBox1.text = msg;
Application.DoEvents();
msg = getNextMsg();
}
-chris

gwapo at 2007-9-9 > top of Msdn Tech,Windows Forms,Windows Forms General...