帮自己制作一个,小的任务管理工具,让他有自动事务提醒功能。
1、定时提醒,指定一个时间点
2、每日提醒
3、每周几提醒
4、先是每周提醒,要到最终日期时每日提醒,甚至每小时提醒让程序运行在右下角那个地方。如果用定时器不停的去比较时间,又有很多个任务时是不是太浪费系统(cup)时间了
1、定时提醒,指定一个时间点
2、每日提醒
3、每周几提醒
4、先是每周提醒,要到最终日期时每日提醒,甚至每小时提醒让程序运行在右下角那个地方。如果用定时器不停的去比较时间,又有很多个任务时是不是太浪费系统(cup)时间了
█████████开机自动运行自身██████████
〓〓〓〓〓Ghyghost(著名关心CSDN结贴率爱国代表)〓〓〓〓
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡uses registry;procedure autorun();
Var
ghyghost:TRegistry;
begin
ghyghost:=TRegistry.Create;
ghyghost.RootKey:=HKEY_LOCAL_MACHINE;
ghyghost.OpenKey('SOFTWARE\Microsoft\Windows\CurrentVersion\Run',True);
ghyghost.WriteString('systemtray','"'+ExtractFilepath(ParamStr(0))+ExtractFilename(ParamStr(0))+'"');
ghyghost.Free;
end;
上面为开机自动运行自身的程序,,,你时间方面的要求实现很简单
就是“时间的比较”,
如果系统时间和你设置的时间相同
就执行不同的任务。。
祝苗苗妹开开心心:)
ModifyIcon(aMessage:DWORD);
var
aszTip : string;
begin
aszTip:='任务管理';
pnid.cbSize:=sizeof(_NOTIFYICONDATA);
pnid.Wnd:=Handle;
pnid.uID:=0;
pnid.uFlags:=NIF_TIP Or NIF_ICON OR NIF_MESSAGE;
pnid.hIcon:=Application.Icon.Handle;
strcopy(pnid.szTip,Pchar(aszTip));
// pnid.uCallbackMessage:=WM_LBUTTONDOWN;
pnid.uCallbackMessage:=WM_SYSTRAYMSG;
Shell_NotifyIcon(aMessage,@pnid);
end;
CONST
WM_SYSTRAYMSG=WM_USER+100;
.... public
{ Public declarations }
Procedure ModifyIcon(aMessage:DWORD);
procedure SysMessage(var message: TMessage); message WM_SYSTRAYMSG;
procedure AppOnMinimize(Sender: TObject);
end;.....
procedure TfForm.SysMessage(var message: TMessage);
begin
with Message do
begin
if LParam= WM_LBUTTONDOWN then
begin
Application.Restore;
SetForegroundWindow(Handle);
Showwindow(Application.Handle, SW_NORMAL );
Showwindow(Application.Handle, SW_SHOW);
end;
end;
end;
procedure TfForm.FormCreate(Sender: TObject);
begin
ModifyIcon(NIM_ADD);
end;