Home » FAQ » WinForms » Form » How can I detect if the user clicks into another window from my modal dialog
Use the Form.Deactivate event:
this.Deactivate += new EventHandle(OnDeactivate); //... private void OnDeactivate(object s, EventArgs e) { this.Close(); }
(from [email protected] on microsoft.public.dotnet.framework.windowsforms)
Platform BlazorASP.NETWinFormsWPF.NET MAUI
Question *
Answer (Optional)
Email (Optional)
Email address is only for further clarification on your FAQ request. It will not be used for any other purpose.
Please leave this field empty.
Share with