The differences between the ways of closing a running windows application

Solution 1:

In this specific case, no, there isn't.

All approaches will probably post a WM_QUIT message to the application itself. It will then handle the message by cleaning up all resources and exiting.

However, in theory, there can be a difference. The File menu is completely under the application's control. What items appear in it and what happens if those items are invoked is application-specific. The author of the application could run completely different code when clicking Exit on the File menu than the one that would run when you use Alt+F4.

Even more theoretically, the developer could override the behavior of accelerator keys like Alt+F4 and run different code than what would run when you press the red X.

Changing the behavior of an application so that it doesn't comply with the default Windows behavior and user expectations, in regards to closing applications, is strictly discouraged. But, so is automatically placing shortcuts to applications on the desktop...

While Alt+F4, the red X and the menu entry on the jump list window are probably identical, in that they post the same message, there are other ways to exit an application, like forcing a process to exit. This should generally be avoided unless the application is no longer responding.

As long as you can exit an application gracefully, by closing the associated window, you should do that, because it allows the application to stop what it's doing, possibly finish writing and close open files, and persist your current state. When you forcibly terminate an application, then it doesn't get the chance to do that. You're basically telling the operating system directly to clean up the process (instead of letting the process clean up itself). But the process itself knows much better how to properly clean itself up.

Task Manager will forcibly terminate the process if you select End Process in the Processes tab. If you use End Task in the Applications section, it will post the WM_QUIT message to the selected application window.