dotnet / dotnet/winforms

Updating the Closing event handlers to FormClosing event handlers doesn't work with Application.Exit() sometimes

Open
#14,924 6 comments 0 reactions 1 assignee Claimed by @KlausLoeffelmann View on GitHub
untriaged
Dominant language
C#
Stars
4.9k
Forks
1.1k
Avg merge
1d 13m
Merged PRs (30d)
85

Description

### .NET version

.NET 10.0

### Did it work in .NET Framework?

No

### Did it work in any of the earlier releases of .NET Core or .NET 5+?

Unknown

### Issue description

When a Window Forms main form creates a second form, Application.Exit() doesn't work with the FormClosing event but does work with the Closing event when the event argument Cancel value is set to true by the second form.

### Steps to reproduce

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.