WinForms programming - Modal and Non-Modal forms problem

后端 未结 5 1015
逝去的感伤
逝去的感伤 2020-12-17 03:25

I have a problem with modality of the forms under C#.NET. Let\'s say I have main form #0 (see the image below). This form represents main application form, where user can pe

5条回答
  •  南笙
    南笙 (楼主)
    2020-12-17 03:51

    The first thing that comes to mind would be something like this. You could disable form 1 when you launch form 2 and then have form 1 handle the closed event of the second form to re-enable itself. You would NOT open modal 2 using show dialog.

    Now keep in mind, from a user perspective this is going to be quite cumbersome, you might look at doing a MDI application to get all windows inside of a single container.

提交回复
热议问题