0
I don’t understand why Form 2 doesn’t show label text in form 1.
form 1
private void button1_Click(object sender, EventArgs e)
{
string Username = textBox1.Text;
HelloForm HF = new HelloForm();
HF.Show();
HF.Username = Username;
this.Hide();
}
}
form 2
public string Username { get; internal set; }
private void HelloForm_Load(object sender, EventArgs e)
{
label1.Text = "Hello " + Username;
}
}
Put the question in Portuguese.
– Ricardo
i want the username string of form 1 to appear on label 1 of form 2
– Pekita
hehe, I understood what you said in English :P But the site is in Portuguese, got it?
– Ricardo
thanks I did not know how to edit for en I’m new on this site just now I saw there the edit button
– Pekita