I am trying to get a text value from NameForm and pull it in Welcome as a label value.
What I have so far, when the Welcome page comes up, it does not give the value of the text but if you click on the label field, it pops up with the NameForm screen. After you enter name again on the NameForm screen, it will show in Welcome.
Screens should be:
NameForm - enter name and click submit to go to Welcome.
Welcome - this has a label field in it that should populate with the name that was entered on the NameForm.
public partial class NameForm : Form
{
private string fullname = " ";
public string nameValue
{ get { return fullname; } }
.......
public void SubNameBtn_Click(object sender, EventArgs e)
{
this.AcceptButton = SubNameBtn;
User user = new User();
user.FirstName = fNameTxt.Text;
user.LastName = lNameTxt.Text;
fullname = fNameTxt.Text; \\using only fNameTxt till figured out
.........
public partial class Welcome : Form
{
public Welcome()
{
InitializeComponent();
CenterToScreen();
}
private void WelNameLbl_Click(object sender, EventArgs e)
{
NameForm frm = new NameForm();
WelNameLbl.Text = frm.nameValue;
frm.Show();
}