2012年9月25日

c# 防早退提醒器

摘要: <?xml version="1.0" encoding="utf-8" ?><configuration> <appSettings> <add key="WorkingStartTime" value="8:30" /> <add key="WorkingEndTime" value="17:30" /> <add key="WorkingHours" value="8&quo 阅读全文

posted @ 2012-09-25 13:54 空明流光 阅读(629) 评论(8) 推荐(0) 编辑

c# 关机、注销、重启代码

摘要: using System;using System.Text;using System.Diagnostics;using System.Runtime.InteropServices;namespace SystemManager{ /// <summary> /// 枚举类型,指定可以允许的重启操作 /// </summary> public enum RestartOptions { /// <summary> /// Shuts down all processes running in the security contex... 阅读全文

posted @ 2012-09-25 13:42 空明流光 阅读(479) 评论(0) 推荐(0) 编辑

C# 关机消息拦截的几种方法:

摘要: Microsoft.Win32.SystemEvents.SessionEnding += new Microsoft.Win32.SessionEndingEventHandler(SystemEvents_SessionEnding); protected override void WndProc(ref Message m) { const int WM_QUERYENDSESSION = 0x011; const int WM_ENDSESSION = 0x16; if (m.Msg == ... 阅读全文

posted @ 2012-09-25 11:15 空明流光 阅读(1112) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示