dotnet-api-docs icon indicating copy to clipboard operation
dotnet-api-docs copied to clipboard

The CloseReason.TaskManagerClosing description is no longer accurate.

Open DaDuStMaN20 opened this issue 5 years ago • 1 comments

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

DaDuStMaN20 avatar Mar 18 '21 09:03 DaDuStMaN20

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

ghost avatar Mar 18 '21 09:03 ghost