How to add status in the main form?

Mar 31 2008 10:30 AM

I have 2 forms:

  1. frmLogIn
  2. frmMainForm

frmLogin has 2 textboxes:

  • txtUserName
  • txtPassword.

frmMainForm has 1 label:

  • lblGreetings

the idea is that if you will enter your username w/ its corresponding password, in the main form (frmMainForm), there should be a welcoming message using the lblGreetings, such as:

WELCOME, (username)!

the idea should be something like:

txtUserName.Text = lblGreetings.Text

 

but as you can see, you just cannot read the value from one form to another, not unless you're going to instantiate the form itself, isn't?

is it possible that I can add such status in the main form?

does the frmMainForm_Load should have:

frmLogin form = new frmLogin()

form.? << what is next?

 

 

any ideas?


Answers (1)