A Spinner Control in C#

For tasks of an undeterminable length, we see ‘spinners’ being used to indicate that something is in progress and that our applications haven’t stopped. I needed one, and so knocked one up:

It’s written in C# and I’ve posted the source code here. It uses GDI+ to render the control as opposed to using a series of bitmaps, and it allows you to configure the number of segments drawn.

Please post any feedback in the comments below.

About Adam


8 Responses to “A Spinner Control in C#”
  1. Zara says:

    Sorry, but I don’t understand why you need those ’spinners’, so maybe I am not high-skilled in this field, but it is just very interesting for me, so please give me more information about it, looking forward to your answer, thanks in advance.

  2. Adam says:

    They’re commonly used in place of progress bars, where you have a task that takes an amount of time, but you don’t have a way of accurately representing your progress through that task. You see them a lot in SQL Server Management studio… that’s what this example is based on. They also appear in web browsers and a lot of web sites although often with a different look.

  3. Phillipp says:

    Thanks for the link with the code. Very useful for me.

  4. Rob says:

    ‘Spinners’ is used as needed. If you do not have time for what a challenge it is simplifying your actions. They also appear in web browsers although often with a different look.

  5. Gary says:

    The source code uses GDI +, to make the control. It is the right decision.
    I think the right decision, I like how the ‘spinners’ across segments.

  6. cubrikaska says:

    Dudo de esto.

  7. PLMCHL says:

    Hey, did an upgrade on your spinner. Added a couple things: http://blog.deblo.is/2012/10/spinner-control-in-c/


Check out what others are saying about this post...
  1. […] was looking for a spinner control to use in one of my projects and found this one to be very interesting. The only thing was that it seemed to lack a few customization […]

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!