How to make circular ProgressBar in C#

In this tutorial we will see how to create a circular ProgressBar.



Create a Windows Forms application, then right click on the project and select Manage NuGet Packages...


Type circular progressbar in Search, select circular progressbar for winforms and click install


Now let's add circular ProgressBar to Toolbox, first right click on the project and choose rebuild. Then right click on Toolbox and select  choose items:



Browse to  "Project folder\packages\CircularProgressBar.2.2.0.0\lib\net35-Client" and select the DLL file:


Now drag CircularProgressBar item to the Form, change its Text and ProgressColor properties, and add a button. In the code add this directive:

using System.Threading;


In button click event add this code:

for(int i=0; i<=100; i++)
{
    Thread.Sleep(5);
    circularProgressBar1.Value = i;
    circularProgressBar1.Update();
}


And Form load event add this code:

circularProgressBar1.Value = 0;
circularProgressBar1.Minimum = 0;
circularProgressBar1.Maximum = 100;

Now run the application


Check for more explanation in this video:






How to make circular ProgressBar in C# How to make circular ProgressBar in C# Reviewed by Bloggeur DZ on 02:34 Rating: 5

1 commentaire:

  1. esa libreria ya no existe, hay pero una diferente :(
    https://goo.gl/Ebnkv7

    tendrás depronto la misma que tienes publicada?
    gracias

    RépondreSupprimer

Fourni par Blogger.