【问题标题】:To detect logoff [duplicate]检测注销[重复] 【发布时间】:2011-04-15 08:55:32 【问题描述】: 是否可以检测 PC 何时注销。我需要开发一个应用程序,它会在 PC 注销之前在文本文档中写入有关注销时间的信息。 【问题讨论】: 标签: c# java .net 【解决方案1】: 对于 .NET,请参阅此问题:Is there a way in c# to detect a Windows shutdown/logoff and cancel that action (after asking the user) 【讨论】: