unit Main;

interface

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

type
  TMainForm = class(TForm)
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    procedure Edit3Exit(Sender: TObject);
    procedure Edit2Exit(Sender: TObject);
    procedure Edit1Exit(Sender: TObject);
    procedure Edit2Enter(Sender: TObject);
    procedure Edit2Click(Sender: TObject);
    procedure Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
    procedure Edit1KeyPress(Sender: TObject; var Key: Char);
  private
  public
  end;

var
  MainForm: TMainForm;

implementation

{$R *.dfm}


procedure TMainForm.Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
   Key := Key;

   if Key = VK_TAB then
   begin
      ShowMessage('Tab');
   end;
end;

procedure TMainForm.Edit1KeyPress(Sender: TObject; var Key: Char);
begin
   Key := Key;

   if Key = #9 then
   begin
      ShowMessage('Tab');
   end;
end;

procedure TMainForm.Edit2Click(Sender: TObject);
begin
   // ShowMessage('Edit2 - OnClick');
end;

procedure TMainForm.Edit2Enter(Sender: TObject);
begin
   // ShowMessage('Edit2 - OnEnter');
end;

procedure TMainForm.Edit2Exit(Sender: TObject);
begin
   ShowMessage('Edit2 - OnExit');
end;

procedure TMainForm.Edit3Exit(Sender: TObject);
begin
   ShowMessage('Edit3 - OnExit');
end;

procedure TMainForm.Edit1Exit(Sender: TObject);
begin
   ShowMessage('Edit1 - OnExit');
end;

end.
