呶,这就是你要的!
procedure TFormMain.FormKeyPress(Sender: TObject; var Key: Char);
var
MYForm: TCustomForm;
begin
if (Key = #13) And Not(ActiveControl is TMemo) then
begin
MYForm := GetParentForm( Self );
if not (MYForm = nil ) then
SendMessage(MYForm.Handle, WM_NEXTDLGCTL, 0, 0);
Key := #0; // 起到这个作用!
end;
end;