StatusBar Text not updating

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.
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top