private void button1_Click(object sender, EventArgs e) { if (textBox1.Text != "" && textBox2.Text != "") { if (textBox1.Text == "admin" && textBox2.Text == "123") { Anasayfa a = new Anasayfa(); this.Visible = false; a.Show(); } else { MessageBox.Show("Girmiş olduğunuz Kullanıcı Adı veya Şifre yanlıştır. Lütfen tekrar deneyiniz."); } } else { MessageBox.Show("Lütfen Kullanıcı Adı veya Şifrenizi Giriniz..."); this.Show(); } }