Delphi - Usando ENTER / UP / DOWN para mudar de campo.
// Uses
Grids
// Colocar
um ApplicationEvents no Form, e no evento OnMessage do ApplicationEvents:
if
Screen.ActiveForm = Self then
begin
if not ((Screen.ActiveControl is
TCustomMemo) or
(Screen.ActiveControl is
TCustomGrid)) then
begin
if Msg.message = WM_KEYDOWN then
begin
case Msg.wParam of
VK_RETURN,VK_DOWN :
Screen.ActiveForm.Perform(WM_NextDlgCtl,0,0);
VK_UP :
Screen.ActiveForm.Perform(WM_NextDlgCtl,1,0);
end;
end;
end;
end;
Nenhum comentário:
Postar um comentário