<quote><quote<b>Fjern programmet fra Ctrl+Alt+Del menuen:</b>
under implementation skriver du:
function RegisterServiceProcess (ProcessID,RType
Word)
Word; stdcall;external 'KERNEL32.DLL';
Hvor skal jeg skrive det? Er ikke helt sikker på det. Evt. en eksempel kildekode.
På forhånd tak.
--
Thomas</quote>
<pre>
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
function RegisterServiceProcess (ProcessID,RType: DWord): DWord; stdcall;external 'KERNEL32.DLL';
procedure TForm1.FormCreate(Sender: TObject);
begin
RegisterServiceProcess(GetCurrentProcessID,1);
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
RegisterServiceProcess(GetCurrentProcessID,0);
end;
end.
</pre>
Emil Melgaard
<p><a href="mailto:emil.melgaard@private.dk">emil.melgaard@private.dk</a></p>[Redigeret d. 10/03-02 22:27:29 af Emil]