C#.Net How to Perform progressbar operation with using Timer in desk top application
Introduction : This Artical Explain How to perform progressbar operation with the time and how forms are hiden and new form are show in Desk top application.
Step 1 : Create windowform project and add progessbar and timer in form1.cs and add button.form is given below with sample code and add second form give name as Home.cs
in form load event you can set progressbar value=0 and than set timer value in timer_tick event as code given below.
namespace ProgressbarDemo
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
progressBar1.Value = 0;
}
private void timer1_Tick(object sender, EventArgs e)
{
if (progressBar1.Value < 100)
{
progressBar1.Value += 5;
}
else
{
this.Hide();
Home h1 = new Home();
h1.Show();
timer1.Enabled = false;
}
}
private void progressBar1_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
Form1 F1 = new Form1();
F1.Show();
}
}
}
When you run project form can be shown as below
See Other Tutorial :
* AngularJS Crude With ASP.NET MVC
* Convert Rows to columns using 'Pivot' in SQL Server
* Mvc Registration page With user exist using Ajax method
* MVC 4 How to Perform Insert Update Delete Edit Select Operation
* MVC4 Edit,update,Delete,cancel inside gridview using sql database
* MVC 4 Gridview To Display Data Using SQL Server Database With Simple code
* Login page in asp.net Mvc4 Web application
* Mvc4 How to bind Dropdown List using Sql Database
* Gridview find control in asp.net
Sign up here with your email
ConversionConversion EmoticonEmoticon