摘要: 第一种方法:就是调用系统API函数更改系统时间[StructLayout(LayoutKind.Sequential)] public struct SystemTime { public ushort wYear; public ushort wMonth; public ushort wDayOfWeek; public ushort wDay; public ushort wHour; pu... 阅读全文
posted @ 2009-12-18 23:42 Xingsoft 阅读(10309) 评论(0) 推荐(1) 编辑
摘要: C#写的关机程序,代码简单主要是用Process类来操作,当然也可以调用 系统API来执行操作。 主要代码为:关机Process.Start("shutdown", "-s -t 0"); 注销 Process.Start("shutdown", "-l "); 重启 Process.Start("shutdown", "-r -t 0");更多的关于Process类的操作,可以了解http:/... 阅读全文
posted @ 2009-12-18 23:29 Xingsoft 阅读(4528) 评论(2) 推荐(0) 编辑