C# MDI Parent detect when MDI Child is closing?

前端 未结 6 1143
青春惊慌失措
青春惊慌失措 2021-01-18 10:18

I\'m attempting to detect, on the MDI parent, when my MDI child form closes, and react accordingly. The MDI parent shouldn\'t do anything until the MDI child closes. Here is

6条回答
  •  感情败类
    2021-01-18 10:38

    While this doesn't really address the problem you're referring to, judging from the use case, you may want to consider opening the Validation form as a modal dialog instead of as an MDI child.

    You can do this using the form's ShowDialog() method where you have Show() now. Keep in mind that ShowDialog() can also return a DialogResult if you assign them to buttons on the other form.

提交回复
热议问题