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.
Show(..)
Deactivate
2.1m questions
2.1m answers
60 comments
57.0k users