/// <summary> /// 登录界面点击注册按钮发生事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btnRegist_Click(object sender, EventArgs e) { // 点击注册按钮显示注册界面 RegistForm rForm = new RegistForm(); // 将当前窗口传递给注册窗口(其实就是把登录窗体作为变量传输给了注册窗口) rForm.logForm = this; rForm.Show(); }