检测到应用程序关闭时关闭PC

编程入门 行业动态 更新时间:2024-10-16 16:00:51
本文介绍了检测到应用程序关闭时关闭PC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想知道是否可以使用Application :: ApplicationExit Event导致计算机关闭,如果有人退出像Sticky Notes这样的应用程序。在这里有人可以提供一些关于我如何做到这一点的示例代码吗?非常基本的编码知识。感谢您的帮助。 我的尝试: 我我曾尝试使用Visual Studio Code来获得粗略的草图,但这完全是我的想法。

I'm wondering if I can use Application::ApplicationExit Event to cause my computer to shutdown if someone exits out of an app like Sticky Notes. Is here someone who could maybe provide some sample code on how I could do this? Very basic knowledge of coding. Your help is appreciated. What I have tried: I've tried to use Visual Studio Code to get a rough sketch, but this is all over my head.

推荐答案

没有。 Application.ApplicationExit事件仅在当前应用程序退出时触发,而不是在关闭其他应用程序时触发。 有可能检测到其他应用程序何时关闭,但正如Richard已经说过您要尝试的内容听起来像恶意软件;很难想到这样做的正当理由。 我们不会宽恕,支持或协助以任何方式,形式或方式生成恶意代码。这是专业开发人员的专业网站。 No. The Application.ApplicationExit Event only fires when the current application is exiting, not when a different application is closed. It is possible to detect when a different app closes, but as Richard has said what you are trying to do sounds like malware; it's difficult to think of a legitimate reason for doing this. And we do not condone, support, or assist in the production of malicious code in any way, form, or manner. This is a professional site for professional developers.

更多推荐

检测到应用程序关闭时关闭PC

本文发布于:2023-07-14 10:08:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1104059.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   检测到   PC

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!