Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm using this statement in an add in to update the first pane of the ArcMap statusbar:

ArcMap.Application.StatusBar.set_Message(0, message);

When the method is called, no exceptions are raised. In my OnClick method, I display a message box and when that occurs, I do see the text of the last message. It seems like the pane needs to be refreshed, but I don't see a method that does that.

I tried:

 ArcMap.Application.RefreshWindow();

but that doesn't help.

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

Try adding a Application.DoEvents, the STA thread probably don't have time to consume events. An other way would be to create a background worker thread that does your work, that would free the STA thread to process the event loop.

share|improve this answer
add comment

Untested suggestion: instead of passing 0, try ArcMap.Application.hWnd.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.