如何隐藏应用程序不在任务栏出现
showwindow(application.handle,sw_hide);屏蔽CTRL+ALT+DEL
var
temp:integer;
屏蔽
SystemParametersInfo(SPL_SCREENSAVERRUNNING,1,@temp,0);
取消屏蔽
SystemParametersInfo(SPL_SCREENSAVERRUNNING,0,@temp,0);不使应用程序的文件名出现在"关闭程序"中首先声明
Function RegisterServiceProcess(DwProcessID,Dwtype:integer):integer;
stdcall;external 'KERNEL32.DLL';屏蔽
RegisterServiceProcess(GetCurrentProcessID,1);
恢复
RegisterServiceProcess(GetCurrentProcessID,0);
showwindow(application.handle,sw_hide);屏蔽CTRL+ALT+DEL
var
temp:integer;
屏蔽
SystemParametersInfo(SPL_SCREENSAVERRUNNING,1,@temp,0);
取消屏蔽
SystemParametersInfo(SPL_SCREENSAVERRUNNING,0,@temp,0);不使应用程序的文件名出现在"关闭程序"中首先声明
Function RegisterServiceProcess(DwProcessID,Dwtype:integer):integer;
stdcall;external 'KERNEL32.DLL';屏蔽
RegisterServiceProcess(GetCurrentProcessID,1);
恢复
RegisterServiceProcess(GetCurrentProcessID,0);
不知道Delphi怎样,现把BCB的代码供你参考:
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
try
{
Application->Initialize();
Application->ShowMainForm = false; //不显示主窗口
ShowWindow(Application->Handle,SW_HIDE);//在任务栏不显示
Application->CreateForm(__classid(TForm1), &Form1);
Application->Run();
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
return 0;
}