unit Unit3;
// 2012 by Thomas Wassermann
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm3 =
class(TForm)
Memo1: TMemo;
Button1: TButton;
Button2: TButton;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
procedure OnChar(Sender: TObject; aChar: Char);
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form3: TForm3;
HookHandle: Cardinal = 0;
Shift:Boolean;
KS: TKeyboardState;
implementation
uses Key_Hook_Class;
var
kl :TKeyLogger;
{$R *.dfm}
Procedure TForm3.OnChar(Sender:TObject;aChar:Char);
begin
Memo1.Lines.Text := Memo1.Lines.Text + aChar;
end;
procedure TForm3.FormCreate(Sender: TObject);
begin
kl :=TKeyLogger.Create;
kl.OnGetChar := OnChar;
end;
procedure TForm3.FormDestroy(Sender: TObject);
begin
kl.Free;
end;
end.