string u=txtUser.Text.Trim();string p=txtPwd.Text.Trim();if(u=="" || p=""){MessageBox.Show("用户名或密码不能为空");return;}if(u=="admin" && p=="admin"){Form2 f=new Form2();f.Show();}else{MessageBox.Show("用户名或密码不正确");}