主窗体 用
var x = new FrmChild(); x.showdialog()
然后子窗体中 确认的 Button里
button_click 事件
// 先验证逻辑,如果成功(比如密码正确) this.DialogResult = DialogResult.Ok;