DelphiFAQ Home Search:
General :: Programming :: Delphi :: VCL
About the Delphi VCL (Visual Component Library)

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Only the 40 most recently viewed articles are shown.
You can see the full list here.

Featured Article

Making Enter key act as Tab

To make the Enter key act as Tab key is a 3 step procedure:

  1. Set the form's KeyPreview property to True
  2. Set all form's buttons property Default to false
  3. 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; 
 

Generated 12:02:03 on Oct 23, 2017