dotnet / dotnet/dotnet-api-docs
The CloseReason.TaskManagerClosing description is no longer accurate.
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
TL;DR: The name and the description are no longer accurate because the task manager no longer triggers that close reason.
It appears that as of Windows 8.1, task manager no longer sends the WM_CLOSE message. According to a question/answer on stack overflow, the new task manager does not use WM_CLOSE anymore. It either uses just TerminateProcess() or a "UserClosing" and a TerminateProcess() after a timeout. At any rate, CloseReason.TaskManagerClosing could be triggered by anything.
It appears, rather, that the CloseReason.TaskManagerClosing is set as the close reason when the window receives a WM_CLOSE message (0x10), which could originate from any process on the system, and not necessarily Task Manager. - StackOverflow User drf
https://stackoverflow.com/questions/6880329/net-forms-keep-disappearing-due-to-taskmanagerclosing
https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Windows.Forms/CloseReason.xml
Contributor guide
Assessment
This issue has not been assessed yet.