var query = db.Users.Where(x => x.UserName == username.Text && x.PassWord == password.Text)
.FirstOrDefault();
if (query != null)
{
MessageBox.Show("sign in successful", "success", MessageBoxButtons.OK, MessageBoxIcon.Information);
HomeScreen hs = new HomeScreen();
hs.labelControl1.Text = query.UserName;
hs.pictureEdit1.EditValue = query.Image;
this.Hide();
hs.Show();
}
What I am doing is showing username at homescreen form but when I go to another form and come back to homescreen form it does not show user name. What I want to do/show is username all time whether I go to another form and later comeback to homescreen. How is this possible?