我有一个开放的模态对话框(Windows窗体)。我想,该对话框关闭对话框之外点击(父窗体上)时。我该怎么办呢?
I have an open modal dialog (Windows Forms). I want, that the dialog is closed when clicking outside the dialog (on the parent form). How can I do that?
您应将其更改为一个无模式对话框(与打开展(..)
)然后使用停用
事件,并将其关闭。
You should change it to a non-modal dialog (open it with Show(..)
) and then use the Deactivate
event and close it.