
ToolBox’dan ekleyeceklerimiz: 2 Label, 2 TextBox, 1 Button.
Button1_Click:
if (textBox1.Text == "" || textBox2.Text == "")
{
MessageBox.Show("Boş Alan Bırakmayın!");
}
else
{
if (textBox1.Text == "abcd")
{
if (textBox2.Text == "1234")
{
MessageBox.Show("Giriş Başarılı!");
}
else
{
MessageBox.Show("Şifre Yanlış!");
}
}
else
{
MessageBox.Show("Kullanıcı Adı Yanlış!");
}
}
Çıktılar: