Merhaba, yapmış olduğum form uygulamasında e-postanın textbox'ında yazan yazıyı label5'in text'ine yazılmasını istiyorum ama şu an kullandığım yöntemde aynı formu aşağıdaki resimdeki gibi iki kere açıyor. Bunu düzeltmenin bir yolu var mı?
C#:
private void button1_Click(object sender, EventArgs e)
{
string user = e_posta.Text;
string password = sifre.Text;
con = new SqlConnection("");
com = new SqlCommand();
con.Open();
com.Connection = con;
com.CommandText = "Select*from uyelik where eposta='" + e_posta.Text + "' and sifre='" + sifre.Text + "' ";
dr = com.ExecuteReader();
if (dr.Read())
{
Form3 gecis = new Form3();
gecis.Show();
this.Hide();
Form3 fr = new Form3();
fr.label5.Text = e_posta.Text;
fr.ShowDialog(this);
e_posta.Text = fr.label5.Text;
}
else
{
MessageBox.Show("Hatalı Kullanıcı Adı Veya Şifre");
}
con.Close();
}
İlk form da açılan e-posta kısmında yazan yazının 2. form da ki label da yazmansını istiyorum ama yukarıdaki kodlar ile aynı anda 2 tane aynı forumu açıyor şu videodan sorunumu daha iyi anlayabilirsin.