这都懒得做? 也就十来分钟的问题!
下面就是了, ALT+F12退出程序, ALT+F11把系统时间调后一分钟。
program SetTime;
uses
Windows,
Messages,
SysUtils;
procedure TurnSysTime;
function SetLocalTime(Value: TDateTime): Boolean;
var
SysTimeVar: TSystemTime;
begin
DateTimeToSystemTime(Value, SysTimeVar);
Result := Windows.SetLocalTime(SysTimeVar);
end;
begin
SetLocalTime(Now - 1/(24 * 60));
end;
var
Msg: TMsg;
begin
if RegisterHotKey(0, 1, MOD_ALT, VK_F12) and RegisterHotKey(0, 11, MOD_ALT, VK_F11) then
while (GetMessage(Msg, 0, 0, 0)) do
begin
if (Msg.Message = WM_HOTKEY) then
begin
case Msg.WPARAM of
1:
Exit;
11:
TurnSysTime;
end;
end;
TranslateMessage(Msg);
DispatchMessage(Msg);
end;
end.