using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
string Username = "ezz";
string Password = "zezo";
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text != null && textBox1.Text == Username)
{
if (textBox2.Text != null && textBox2.Text == Password)
{
this.Close();
}
else
{
MessageBox.Show("wrong password");
}
}
}
private void button2_Click(object sender, System.EventArgs e)
{
Application.Exit();
}
}
}
ADD THIS TO MAIN
Application.Run(new Form1());
Application.Run(new Form2());