大富翁上回答的太多了,这是从大富翁上复制下来的:
试试这个!是hubDog的葵花宝典上的,在NT下不好用!我试过!
program Project1;
uses
Forms,
Unit1 in 'Unit1.pas' {Form1},
Windows;
{$R *.RES}
var
ExtendedStyle : Integer;
begin
Application.Initialize;
//==============================================================
ExtendedStyle := GetWindowLong (Application.Handle, GWL_EXSTYLE);
SetWindowLong(Application.Handle, GWL_EXSTYLE, ExtendedStyle OR WS_EX_TOOLWINDOW
AND NOT WS_EX_APPWINDOW);
//===============================================================
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
还有这个,不一任务列表里显示
Wjiachun网友以前的答案,非常好用!!!:
如果是Win9x,则在主程序的implementation前面加上一句:
function RegisterServiceProcess(dwPID
Word;dwType
Word):boolean;
StdCall;External 'Kernel32.DLL';
然后可以在Form1.Create和Form1.Close里面分别用下面两句来注册服务或取消:
RegisterServiceProcess(0,1);{隐藏}
RegisterServiceProcess(0,0);{解除}
NT好像不行