Delphi .NET (2) Database (71) Delphi IDE (90) Network (39) Printing (3) Strings (12) VCL (83) Windows with Delphi (280)
Exchange Links About this site Links to us 
|
Making Enter key act as Tab
This article has not been rated yet. After reading, feel free to leave comments and rate it.
To make the Enter key act as Tab key is a 3 step procedure:
- Set the form's KeyPreview property to True
- Set all form's buttons property Default to false
- Create an OnKeyPress event for the form like this:
 | |  | |
procedure TForm1.FormKeyPress(Sender: TObject; var Key: Char);
begin
if Key = #13 then begin
Key := #0;
if (Sender is TDBGrid) then
TDBGrid(Sender).Perform(WM_KeyDown,VK_Tab,0)
else
Perform(Wm_NextDlgCtl,0,0);
end;
end;
| |  | |  |
Comments:
|