📄 gdiplusclock.dpr
字号:
{*******************************************************}
{* Email: fansheng_hx@163.com *}
{* QQ: 39262884 *}
{*******************************************************}
program GDIPlusClock;
uses
Forms,
Windows,
Main in 'Main.pas' {FmMain},
KeyboardHook in '..\HOOK\KeyboardHook.pas',
MouseHook in '..\HOOK\MouseHook.pas',
DMHook in 'DMHook.pas' {DM: TDataModule},
IdleConst in '..\HOOK\IdleConst.pas',
RemindTime in 'RemindTime.pas' {FmRemindTime};
{$R *.res}
{$R Windowsxp.res}
const
CSMutexName = 'Global\GDI_PLUS_CLOCK_Mutex';
var
Msg: TMsg;
OneInstanceMutex: THandle;
SecMem: SECURITY_ATTRIBUTES;
aSD: SECURITY_DESCRIPTOR;
begin
InitializeSecurityDescriptor(@aSD, SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorDacl(@aSD, True, nil, False);
SecMem.nLength := SizeOf(SECURITY_ATTRIBUTES);
SecMem.lpSecurityDescriptor := @aSD;
SecMem.bInheritHandle := False;
OneInstanceMutex := CreateMutex(@SecMem, False, CSMutexName);
if (GetLastError = ERROR_ALREADY_EXISTS)then
begin
MessageBox(0, 'Error, GDI+ Clock Program already running!', 'Title', MB_ICONINFORMATION);
CloseHandle(OneInstanceMutex);
Exit;
end;
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TFmMain, FmMain);
Application.CreateForm(TDM, DM);
SetWindowLong(FmMain.Handle, GWL_EXSTYLE,
(GetWindowLong(FmMain.Handle, GWL_EXSTYLE) and not WS_EX_APPWINDOW) or WS_EX_TOOLWINDOW);
Application.Run;
CloseHandle(OneInstanceMutex);
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -