How to make the Enter key work like Tab

We know that, generally, pressing the Tab key moves the input focus to next control and Shift-Tab to previous in the tab order of the form. When working with Windows applications, most users intuitively expect the Enter key to behave like a Tab key.
Over the past few years, I’ve seen a lot of third-party code for implementing better data entry processing in Delphi. In this article, I’ll try to bring you the best methods I have found (with some modifications of my own).
Examples below are written with the assumption that there is no default button on the form. When your form contains a button whose Default property is set to True, pressing Enter at runtime executes any code contained in the button’s OnClick event handler.

Enter as Tab
The next code causes Enter to behave like Tab, and Shift+Enter like Shift+Tab: