C# Circular ProgressBar Update and Timer


Hey here we look at Circular progressbar from italk theme.Please this is a third party library/theme we are using.They have a pretty nice circular/radial progressbar that we are using.Am attaching full source code so that you can run in your visual studio.

The theme is a single C# file that you simply copy into your project and rebuild and it adds various components in your toolbar in visual studio.Its easy,no setup or configurations. Note we are using the progresbar in a similar way we use the ordinary winforms progresbar.  

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Circular_Progress
{
    public partial class Form1 : Form
    {
        int progress = 0;

        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
        private void timer1_Tick(object sender, EventArgs e)
        {
            //INCREMENT OUR PROGRESS VALUE
            progress += 1;
            if(progress >=100)
            {
                timer1.Enabled = false;
                timer1.Stop();
            }

            //OTHERWISE
            progressBar1.Value = progress;
            pb.Value = progress;
        }

        private void startBtn_Click(object sender, EventArgs e)
        {
            progress = 0;
            timer1.Enabled = true;
            timer1.Interval = 50;
        }

    }
}

Cheers.

How do You Feel after reading this?

According to scientists, we humans have 8 primary innate emotions: joy, acceptance, fear, surprise, sadness, disgust, anger, and anticipation. Feel free to tell us how you feel about this article using these emotes or via the comment section. This feedback helps us gauge our progress.

Help me Grow.

I set myself some growth ambitions I desire to achieve by this year's end regarding this website and my youtube channel. Am halfway. Help me reach them by:




Recommendations


What do You Think


Previous Post Next Post