Sunday, August 1, 2010

Login Page




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

namespace Login
{
    public partial class Form1 : Form
    {
        int count = 0;
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (count > 3)
            {
                MessageBox.Show("You exceeded the limit , Your Account has been blocked");
                return;
            }
            if (textBox1.Text == "user" && textBox2.Text == "user")
            {
                MessageBox.Show("Welcome User");
            }
            else
            {
                MessageBox.Show("Invalid Login");
                count++;
            }
           
        }
    }
}

No comments:

Post a Comment