[solved]how to get a value of textbox.text from another form?
I have 2 forms, one is frmLogin, one is frmRetrievePW.on frmLogin, i have "txtUsername.text" which enables user to input a user name. When i click on a button, it frmRetrievePW opens up.while the frmRetrievePW opens, I want to pass the input value of "txtUsername.text" from frmLogin to frmRetrievePW and display it into txtRetrievePW.text.I tried this in frmRetrievePW onLoad event to test whether it's working, however, it didnt work. can anyone help out plz?
I have 2 forms, one is frmLogin, one is frmRetrievePW.on frmLogin, i have "txtUsername.text" which enables user to input a user name. When i click on a button, it frmRetrievePW opens up.while the frmRetrievePW opens, I want to pass the input value of "txtUsername.text" from frmLogin to frmRetrievePW and display it into txtRetrievePW.text.I tried this in frmRetrievePW onLoad event to test whether it's working, however, it didnt work. can anyone help out plz?
VB.NET:
Dim frmLogin As New frmLogin txtRetrievePW.text = frmLogin.txtUsername.text MessageBox.Show(frmLogin.txtLoginName.Text) 'just for testing
Last edited: