Moin
das könnte so in der Art aussehen:
Delphi-Quellcode:
procedure EditKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.EditKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
var
mgsTemp: TMsg;
begin
if Key = VK_RETURN then
begin
PeekMessage(mgsTemp, 0, WM_CHAR, WM_CHAR, PM_REMOVE);
end;
end;
// ...
var
i: Integer;
begin
for i := 0 to ComponentCount - 1 do
begin
if Components[i] is TEdit then
(Components[i] as TEdit).OnKeyDown := EditKeyDown;
end;