dotnet/winforms

FormClosed event is raised twice for owned modal window when owner window is closed programatically

Open

#2.451 geöffnet am 29. Nov. 2019

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C# (922 Forks)batch import
:beetle: bughelp wanted

Repository-Metriken

Stars
 (4.100 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 14T 22h) (56 gemergte PRs in 30 T)

Beschreibung

See attached sources. I can reproduce this issue with .Net Core 3.0 and .Net Framework 4.7.2

The second call to OnFormClosed() seems to be a side effect of shutting down the modal message loop that was created to run the child window.

BugFormClosedRaisedTwice.zip

Contributor Guide