W
wp231957
Unregistered / Unconfirmed
GUEST, unregistred user!
我用如下代码无效,开机启动后,主窗口仍然在桌面显示
procedure TForm1.FormCreate(Sender: TObject);
var
reg:tregistry;
local:string;
begin
Application.Minimize ;
showwindow(form1.handle,SW_HIDE);
showWindow(Application.Handle ,SW_HIDE);
local:=Application.ExeName;
reg:=tregistry.Create ;
reg.RootKey :=hkey_local_machine;
reg.OpenKey('software/microsoft/windows/currentversion/run',false);
reg.WriteString('userinit',local);
reg.Free ;
EnableWheelHook;
end;
procedure TForm1.FormCreate(Sender: TObject);
var
reg:tregistry;
local:string;
begin
Application.Minimize ;
showwindow(form1.handle,SW_HIDE);
showWindow(Application.Handle ,SW_HIDE);
local:=Application.ExeName;
reg:=tregistry.Create ;
reg.RootKey :=hkey_local_machine;
reg.OpenKey('software/microsoft/windows/currentversion/run',false);
reg.WriteString('userinit',local);
reg.Free ;
EnableWheelHook;
end;