码迷,mamicode.com
首页 > Windows程序 > 详细

设置随机启动--《用delphi开发共享软件》-15.1任务管理器

时间:2015-04-27 20:03:39      阅读:173      评论:0      收藏:0      [点我收藏+]

标签:

在设置窗体中 chkAutoStart: TCheckBox;

procedure TFrmSetup.FormCreate(Sender: TObject);
Var s:String;
_RootKey: HKEY;
_Localkey: String;
begin
{$ifdef Proxy}
btnAbout.Enabled :=False;
{$endif}

_RootKey:=HKEY_LOCAL_MACHINE;
_LocalKey:=‘software\microsoft\windows\currentversion\run‘;

chkAutoStart.Checked :=RegistryValueExist(_RootKey,_Localkey,‘AutoTvStart‘,application.ExeName);

end;

procedure TFrmSetup.chkAutoStartClick(Sender: TObject); //点击TCheckBox时;
Var _RootKey: HKEY;
_Localkey: String;
begin
_RootKey:=HKEY_LOCAL_MACHINE;
_LocalKey:=‘software\microsoft\windows\currentversion\run‘;
if chkAutoStart.Checked then
AddOneRegistryValue(_RootKey,_Localkey,‘AutoTask‘, Application.ExeName)
else
DeleteOneRegistryValue(_RootKey, _Localkey,‘AutoTask‘);
end;

设置随机启动--《用delphi开发共享软件》-15.1任务管理器

标签:

原文地址:http://www.cnblogs.com/rogge7/p/4460886.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!