(1)在界面的OnActive事件中,
procedure TfrmTech_Material.FormActivate(Sender: TObject);
begin
self.KeyPreview:= true;
end;
(2)在界面的OnKeydown事件中,
procedure TfrmTech_Material.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState); begin if (Key = 13) then begin
Key:= 0;
Perform(WM_NEXTDLGCTL, 0, 0);
end;
end;