Friday, 3 April 2015

Progress Bar Open Login Button Click


Progress Bar Open WhenEver Click Button Load  The Progress Bar Particular Interval After go To Next Form Using C# Window Application.

                           DEMO 



         
                             C# CODING

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 WindowsFormsApplication2
{
    public partial class Login : Form
    {
        public Login()
        {
            InitializeComponent();
           
        }
       

        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text == "A" && textBox2.Text == "A")
            {
                progressBar1.Visible = true;

                timer1.Enabled = true;
            }
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            progressBar1.PerformStep();

            if (Convert.ToInt32(progressBar1.Value) == 100)
            {
               timer1.Enabled = false;

               Home h = new Home();
               h.Show();
            }
        }
        private void Login_Load(object sender, EventArgs e)
        {
            Login frm = new Login();
            frm.FormBorderStyle = FormBorderStyle.FixedDialog;
            frm.StartPosition = FormStartPosition.CenterScreen;
            progressBar1.Visible = false;

        }         
                                
    }
}






















0 comments:

Post a Comment