StatusBar Text not updating

  • Thread starter Thread starter dumbledad
  • Start date Start date
D

dumbledad

Hi All,

I have these two lines of code in an event handler:

statusBar1.Text = e.msg;
System.Diagnostics.Debug.WriteLine(e.msg);

For the first twothousand or so events both lines work, but after a
while the status bar text is not updating, though I can see the e.msg
text in the debug output pane in VS.Net. If I put a breakline in and a
watch on statusBar1.Text the text has changed, but it isn't updated in
the UI. Why?

Cheers,

Tim.
 
Form content only appears altered when it is redrawn. You say both lines
execute as you expect them to for the first several times. Does your
execution path change after a point. I call the DoEvents (or something like
it) method and that redraws the window. DoEvents may be called by something
else you do that returns control to windows internal code that then does
events.
 
Back
Top