且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在WPF应用程序中捕获Windows关闭事件

更新时间:2023-01-26 12:08:08

有一个内置事件

There is a built-in event Application.SessionEnding - this event fires when the user logs off or shuts down the computer... you just need to subscribe to that and put your code to save date etc. in there...