1小时关机F8报时
1小时关机F8报时+开机自运行隐藏窗体 unit oneHRout; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls,registry; type TForm1 = class(TForm) Label1: TLabel; Timer1: TTimer; Label2: TLabel; Timer2: TTimer; // 定义关机函数SetPrivilege以备关机用 function SetPrivileg e(privilegeName: string; enable: boolean): boolean; // 定义中断函数GetSysTime以获取系统的运行时间 //function GetSysTime:dword; procedure FormCreate(Sender: TObject); procedure Timer1Timer(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure Timer2Timer(Sender: TObject); private { Private declarations } //定义关快捷键过程HotKeyDown实现按F8弹出窗口报告运行时间 procedure HotKeyDown(var Msg: Tmessage); message WM_HOTKEY; public { Public declarations } end; e(privilegeName: string; enable: boolean): boolean; // 定义中断函数GetSysTime以获取系统的运行时间 //function GetSysTime:dword; procedure FormCreate(Sender: TObject); procedure Timer1Timer(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure Timer2Timer(Sender: TObject); private { Private declarations } //定义关快捷键过程HotKeyDown实现按F8弹出窗口报告运行时间 procedure HotKeyDown(var Msg: Tmessage); message WM_HOTKEY; public { Public declarations } end;
用户评论