Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1635
Marquee in statusbar not visible
posted

I'd like to show Marquee in statusbar during backgroundworking.

So, I added it to statusbar and then start it, but the marquee does not show up.

Following is the code....

this.ultraStatusBar1.Panels.Add("Marquee", Infragistics.Win.UltraWinStatusBar.PanelStyle.Marquee);
this.ultraStatusBar1.Panels["Marquee"].MarqueeInfo.Delay = 10;
this.ultraStatusBar1.Panels["Marquee"].MarqueeInfo.IsActive = true;
this.ultraStatusBar1.Panels["Marquee"].MarqueeInfo.Start();

  • 53790
    Suggested Answer
    posted

    Maybe one possible solution could be if you are using:

    public partial class Form1 : Form

    {

        private BackgroundWorker backgroundWorker1;

      public Form1()

       {

           InitializeComponent();

        this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();

        backgroundWorker1.DoWork +=new DoWorkEventHandler(backgroundWorker1_DoWork);

       }

      void backgroundWorker1_DoWork(object sender, DoWorkEventArgse)

       {

        for (int i = 0; i <= 100; i++)

          {

           // Just do delay in the background process

          DateTime tempValue = DateTime.Now;

          while (tempValue.AddSeconds(1) > DateTime.Now)

              {

               Debug.WriteLine(DateTime.Now.ToString());

              }

          this.ultraStatusBar1.Panels[0].ProgressBarInfo.Value = i;

          this.ultraStatusBar1.Panels[1].ProgressBarInfo.Value = i;

          this.ultraStatusBar1.Invoke((MethodInvoker)delegate()

             {

               this.ultraStatusBar1.Panels[1].Text = "Loading " + ultraStatusBar1.Panels[1].ProgressBarInfo.Value.ToString() + " %";

             });

            }

      }

    private void ultraButton1_Click(object sender, EventArgs e)

      {

      this.backgroundWorker1.RunWorkerAsync();

      }

    }

    Please take a look at the attached sample for more details and let me know if you have any questions

     

    UltraStatusBarWithProgressBar_Threads.zip