1. Computing

Use arrow keys to move between controls

From , former About.com Guide

The UP and DOWN arrow keys are virtually useless in edit controls. So why not use them for navigating between fields. If you set the KeyPreview property of a form to True you can use the following code snippet in the OnKeyDown event of the form to control navigation.

~~~~~~~~~~~~~~~~~~~~~~~~~
procedure TForm1.FormKeyDown(
     Sender : TObject;
     var Key: Word;
     Shift : TShiftState
   ) ;
var
   Direction : Integer;
begin
   Direction := -1;
   case Key of
     VK_DOWN, VK_RETURN : Direction := 0; {Next}
     VK_UP : Direction := 1; {Previous}
   end;
   if Direction <> -1 then
   begin
     Perform(WM_NEXTDLGCTL, Direction, 0) ;
     Key := 0;
   end;
end;
~~~~~~~~~~~~~~~~~~~~~~~~~

Delphi tips navigator:
» Open an applet from the Control Panel
« Make an Application window full screen

©2013 About.com. All rights reserved.