locked
How can I display the spinning Windows waiting logo in my application? RRS feed

  • Question

  • When a user starts the application, I want it to automatically check for updates and while it's doing that on the screen it will have the spinning logo and it will say Let's ensure we're on the latest and greatest version before we begin. We'll start in a moment.

    How could I do this?


    • Edited by bb7548 Wednesday, January 10, 2018 2:13 AM
    • Moved by CoolDadTx Wednesday, January 10, 2018 3:02 PM Winforms related
    • Moved by Stanly Fan Monday, January 22, 2018 7:50 AM
    Wednesday, January 10, 2018 2:07 AM

All replies

  • When a user starts the application, I want it to automatically check for updates and while it's doing that on the screen it will have the spinning logo and it will say Let's ensure we're on the latest and greatest version before we begin. We'll start in a moment.

    How could I do this?



    You need to provide a lot more details if you want specific advice.

    What kind of application is this?

    Are you talking about the spinning mouse cursor used in some applications
    to signal "Waiting"? (This used to be an hourglass cursor in older versions
    of Windows.)

    Or are you talking about the animation when Windows is starting up that
    shows the four parts of the Windows logo gradually coming together?

    Or something else?

    Do you have your own logo and you want it to be spinning? If so, what
    kind of image file is it?

    - Wayne

    Wednesday, January 10, 2018 4:19 AM
  • Oh, those small dots formed in a circle that spin around like in Windows 8 and 10.
    Wednesday, January 10, 2018 4:25 AM
  • Oh, those small dots formed in a circle that spin around like in Windows 8 and 10.


    I'm still waiting for an answer to my first question.

    Is this WinForms?

    - Wayne

    Wednesday, January 10, 2018 4:59 AM
  • Oh, those small dots formed in a circle that spin around like in Windows 8 and 10.

    Crate a simple WinForms application with just a button and a label on it.

    For the button click event, add this code:

      bool toggle = true;
      private void button1_Click(object sender, EventArgs e)
      {
          if (toggle)
          {
              //this.Cursor = System.Windows.Forms.Cursors.AppStarting;
              this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
              label1.Text = "We'll start in a moment.";
              toggle = false;
          }
          else
          {
              this.Cursor = System.Windows.Forms.Cursors.Default;
              label1.Text = "";
              toggle = true;
          }
      }
    

    Click the button repeatedly to alternately change the cursor and the label.

    Is this similar to the effect you want?

    - Wayne

    Wednesday, January 10, 2018 5:06 AM
  • Alternative way to set the wait cursor:

    //this.Cursor = System.Windows.Forms.Cursors.WaitCursor;
    this.UseWaitCursor = true;
    
    
    //this.Cursor = System.Windows.Forms.Cursors.Default;
    this.UseWaitCursor = false;
    

    - Wayne

    • Proposed as answer by Stanly Fan Tuesday, January 16, 2018 3:03 AM
    Wednesday, January 10, 2018 5:19 AM
  • Yet another way:

    Application.UseWaitCursor = true;
    
    Application.UseWaitCursor = false;
    

    - Wayne

    Wednesday, January 10, 2018 5:24 AM
  • Oh, ok.
    Wednesday, January 10, 2018 5:59 AM
  • Hello TurtlesBeast23,

    Did you mean the question has been solved or others? It would be nice if you provided more specific information with WayneAKing questions.

    Sincerely,

    Neil Hu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, January 10, 2018 7:22 AM