English 中文(简体)
当我们取消视窗任务主管的某些应用时,会发生什么事件?
原标题:Which event fires when we cancel some App by Windows Task Manager?

我需要知道,如果由Windows 任务主管取消,在WPF申请中会发生什么事件?

目的是准确终止内部任用。

谢谢!

最佳回答
  • When you use the "Processes" tab there is no event, because your process is simply killed.
  • When you use the "Applications" tab, a normal WM_CLOSE message is sent to the top level of your application. See the last answer here on how to detect this in a WPF application.
问题回答

目的是准确终止内部任用。

你可以可靠地这样做。 如果使用者终止这种申请,那就错了,或者根本不关心。 你可以做些什么,你回头来。 对生态后清理工作表示担忧:操作系统对你来说就是这样,无需感谢你。

你们可以做的最好事情是处理标准近事。 如果用户要求通过正常手段或通过任务主管以礼貌方式结束你的供述,就会启动这些要求(如果用户从“复制”的表格中点击“第二任务”的话,Task管理员将尝试先问。 但是,既然我假定你已经这样做,你就尽了所能。

不可能由任务主管机构处理这项活动,因为它为平凡地关闭申请而努力。

但是,你可以尝试处理申请类别会议,在MSDN中描述以下内容:





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签