$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Track and Status Control for WinForms
Easily customizing Track and Status controls and build interactive and attractive UI
Home > WinForms UI Controls > User Manual > Get Started of Progress Bar in C#

C# Add Progress Bar to Windows Forms Application

KetticProgressBar control is designed to display the progress information in a running operation. It supports the themes provided in the Kettic UI WinForms controls so that developers are able to choose the built-in themes or create custom ones. The expand functionality of the Progress Bar control that is better than the standard one include the support for displaying text and images within the progress bar, indicator styles of dashed and cross-hatched, and displaying two values on a single progress bar.

C# Tutorial for Adding Progress Bar in Windows Forms

The following steps demonstrate how to add progress bar to display the running operation for C# Windows Forms application. The progress bar imitates the Timer interface control.
  • Open your existing Windows Forms application or create a new .NET project in your Visual Studio
  • Drag the UI controls, KetticProgressBar, KetticButton, and the standard Timer, from the toolbox and drop them on the form in your project
  • Set the Interval property of the Timer control to 50 and then click the events button, double clicks the Tick event.
  • Copy the C# code below and paste them to the event handler of the Tick event for Timer control

int ticks = 0;
private void timer1_Tick(object sender, EventArgs e)
{
ticks++;
ketticProgressBar1.Value1 = ticks;
if (ticks == 100)
{
timer1.Enabled = false;
ticks = 0;
}
}
  • After setting the Timer control, we can switch to the design view of the form to set the KetticButton control.
  • Select the Text property of the KetticButton in the Properties window and set its value to Go, and then click the events button, double clicks the Click event.
  • Copy the C# code below and paste them to the event handler of the Click event for KetticButton control

void ketticButton1_Click(object sender, EventArgs e)
{
timer1.Enabled = true;
}
  • Now, we can set the KetticProgressBar control in the design view of the Windows Forms
  • Enable the Dash property, and assign the Text property to an empty string
  • Change the SeparatorColer1 to Yellow and the SeparatorColor2 to Gold
  • Assign the SeparatorWidth property to 5, the StepWidth to 10, and the SweepAngle to 230
  • After the above steps, we can run the .NET project and then click the Go button to check the KetticProgressBar animation
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls