一种方法就是将应用程序直接加到开始菜单的启动菜单中。此外。你还可以在注册表中添加适当的键并赋值,就像以下所示:
procedure TForm1.Button1Click(Sender: TObject);
begin
SetRegistryData(HKEY_LOCAL_MACHINE,
'Software\Microsoft\Windows\CurrentVersion\Run',
Application.Title, rdString, Application.ExeName);
end;
作为应用程序的替代,Title你可以为应用程序另写一个唯一的字符串作为Title,ExeName处你可以写应用程序的完整地址(如果运行需要命令和参数的话亦可加上).
procedure TForm1.Button1Click(Sender: TObject);
begin
SetRegistryData(HKEY_LOCAL_MACHINE,
'Software\Microsoft\Windows\CurrentVersion\Run',
Application.Title, rdString, Application.ExeName);
end;
作为应用程序的替代,Title你可以为应用程序另写一个唯一的字符串作为Title,ExeName处你可以写应用程序的完整地址(如果运行需要命令和参数的话亦可加上).
浙公网安备 33010602011771号