dotnet/winforms

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

Aberta

#2.451 aberto em 29 de nov. de 2019

 (2 comentários) (0 reação) (0 responsável)C# (922 forks)batch import
:beetle: bughelp wanted

Métricas do repositório

Stars
 (4.100 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

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

Guia do colaborador