How to disable the parent form when a child form is active?

前端 未结 13 2200
闹比i
闹比i 2020-12-12 23:26

How to disable a parent form when child form is active using c#?

13条回答
  •  暖寄归人
    2020-12-13 00:08

    Its simple, use

      Form.ShowDialog();
    

    Instead

      Form.Show();
    

    While using Form.ShowDialog()you cannot interact with the parent form until it closes.

提交回复
热议问题