Divelements Community
Customer discussion of all Divelements products

StatusBar

Latest post 09-23-2008 2:43 by craig. 0 replies.
  • 09-23-2008 2:43

    • craig
    • Top 200 Contributor
    • Joined on 11-19-2006
    • Posts 8

    StatusBar

    Hi

    I'm using version 1.4.2.1 of SandBar.  I perform a number of operations that update the text on the status bar.  The operations are executed on a background thread.  When the background thread completes, I fire an event, the form containing the status bar intercepts the event and marshalls the text updates onto the UI thread by evaluating InvokeRequired as follows:

     

     

    private 

    void OnOperationComplete(object sender, EventArgs e) {
     
    if (InvokeRequired) {
        Invoke
    (
    new EventHandler(OnOperationComplete));
      }
      else {
        statusBarItem.Text = "Complete!";
        statusBar.Refresh();
      }
    }

     

     

     

    I'm not sure why I get this error: "Object is currently in use elsewhere".  The status bar ends up with a big red x through it...

    Hope someone can help.

    Craig

    Filed under:
Page 1 of 1 (1 items) | RSS
Copyright © 2008 Divelements Limited
Powered by Community Server (Commercial Edition), by Telligent Systems