dotnet/winforms

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

Open

#2451 aperta il 29 nov 2019

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)C# (922 fork)batch import
:beetle: bughelp wanted

Metriche repository

Star
 (4100 star)
Metriche merge PR
 (Merge medio 14g 22h) (56 PR mergiate in 30 g)

Descrizione

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

Guida contributor