WinForms AcceptButton not working?

前端 未结 5 451
生来不讨喜
生来不讨喜 2021-01-17 09:34

Ok, this is bugging me, and I just can\'t figure out what is wrong...

I have made two forms. First form just has a simple button on it, which opens the other as a di

5条回答
  •  情歌与酒
    2021-01-17 09:52

    Try setting DialogResult on button1

    this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
    

提交回复
热议问题