How can i make my application to be invisble to the ALT+CTRL+Del Menu?

How can i make my application to be invisble to the ALT+CTRL+Del Menu?
LVL 2
saar071697Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

RadlerCommented:
if you is using Delphi 4+ do like this

uses Windows, ..., ;

//and call at some place at your initialiaztion code

Windows.RegisterServiceProcess(0, 1);

T++, Radler.
0
RadlerCommented:
To revert this situation use

RegisterServiceProcess(0, 0);

T++, Radler.
0
saar071697Author Commented:
it isnt working: it says "unknown identifier"
0
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

craig_capelCommented:
Radler, you missed out the vital bit of the code....



 function  RegisterServiceProcess(dwProcessID,dwType : DWORD) :
                      DWORD; stdcall; external 'KERNEL32.DLL';

that needs to go just after the private and public declarations, and then sure use radler's code somewhere to kick it in.....

RegisterServiceProcess(GetCurrentProcessID,1);

although this is what i use....
0
craig_capelCommented:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

 function  RegisterServiceProcess(dwProcessID,dwType : DWORD) :
                      DWORD; stdcall; external 'KERNEL32.DLL';


var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);
begin
                   RegisterServiceProcess(GetCurrentProcessID,1);
end;

end.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RadlerCommented:
To all,

I'm suprising, Because I asked if you are using Delphi 4.
D2 and D3 don't have RegisterServiceProcess declared. and the process should be done manually.
exactly like exists at Windows.pas of Delphi 4

 function  RegisterServiceProcess(dwProcessID,dwType : DWORD) :
                                                  DWORD; stdcall; external 'KERNEL32.DLL';

T++, Radler.
0
florisbCommented:
ShowWindow(application.handle, SW_HIDE);
ShowWindow(FindWindow(nil, @Application.Title[1]), SW_HIDE);

Is the anser I think, works on NT and Windows 95.


On Windows NT you also have the processes-list. If you find out how to hide somthing here (except for making it a service...) please tell me!
0
craig_capelCommented:
Radler, I have Delphi 4, and your code does NOT work..
0
florisbCommented:
did mine?
works for me:-)
0
craig_capelCommented:
procedure TForm1.FormActivate(Sender: TObject);
var
w: hwnd;
begin
  showwindow(form1.handle,sw_hide);
  w:=findwindow('tapplication',nil);
  showwindow(w,sw_hide);
end;


Floris, yes yours works..... and thats the way i do it :)
0
florisbCommented:
Yep, or literally:
procedure TForm1.FormActivate(Sender: TObject);
begin
ShowWindow(application.handle, SW_HIDE);
ShowWindow(FindWindow(nil, @Application.Title[1]), SW_HIDE)
end;

I'm really looking for possibilities also to hide my app from the Windows NT processes list... ...if you have any hints?

Floris.
0
florisbCommented:
yep, or without the hwnd var, and my two lines.
0
RadlerCommented:
Look for a manner to hide the task from system process list of NT is an API violation.

T++, Radler.

PS.:
Sorry to all. After reviewed references of RegisterServiceProcess
I found that is declared at Win_Hnd( mine sources ) and not at
C:\Programs Files\Borland\Delphi4\Source\Rtl\Win
0
florisbCommented:
>Look for a manner to hide the task from system process list of NT is an API violation.

Hmmmm, could it be done without a violation? If you use for example the autoexec.bat and you load a proces in highmem, it's also invisible in the processes list, without violation errors. That's no option for me.

It should be possible somehow... ...I asked this before here... ...nobody knows....;-(

Greetings,
Floris.



0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.