Home > database > Bosses, how to modify the login password in another window, login password is fixed, no links databa
Bosses, how to modify the login password in another window, login password is fixed, no links databa
Time:09-28
Private void btnLogin_Click (object sender, EventArgs e) { If (txtUser. Text. The ToString ()=="123456" & amp; & TxtPassword. Text. The ToString ()=="123456") { This. Hide (); ManagementForm eManagementForm=new ManagementForm (); EManagementForm. ShowDialog (); Enclosing the Close (); } The else { MessageBox. Show (" the user name or password error!" ); }
CodePudding user response:
Problem description specific again, whether want to put the user name and password are passed to the second window? The simplest way is to change the window 2 Modifier in the text box attributes to public, you can directly call: EManagementForm. TxtUserName=this. TxtUser. Text; EManagementForm. TxtUserPwd=this. TxtPassword. Text; EManagementForm. ShowDialog ();