Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Enter as tab.
Sat, Jul 20 2013 5:08 PMPermanent Link

Amaury López

ASESYS

I use this in the forms.  It's Works fine.

function TfrmAcceso.frmAccesoKeyPress(Sender: TObject; Key: Char; ShiftKey, CtrlKey, AltKey: Boolean): Boolean;
begin
  if (not (ShiftKey or CtrlKey or AltKey)) and (Key=#13) then
  begin
     NextControl(true);
     Result:=False;
  end
  else
   Result:=True;
end;

if someone else needs it is free to use.
Sat, Jul 20 2013 6:26 PMPermanent Link

Amaury López

ASESYS

If you want to tbutton works then use the correction:

function TfrmAcceso.frmAccesoKeyPress(Sender: TObject; Key: Char; ShiftKey, CtrlKey, AltKey: Boolean): Boolean;
begin
  if (not (ShiftKey or CtrlKey or AltKey)) and (Key=#13) and (not (ActiveControl is tbuttoncontrol)) then
  begin
     NextControl(True);
     Result:=False;
  end
  else
     Result:=True;
end;


Amaury López wrote:

I use this in the forms.  It's Works fine.

function TfrmAcceso.frmAccesoKeyPress(Sender: TObject; Key: Char; ShiftKey, CtrlKey, AltKey: Boolean): Boolean;
begin
  if (not (ShiftKey or CtrlKey or AltKey)) and (Key=#13) then
  begin
     NextControl(true);
     Result:=False;
  end
  else
   Result:=True;
end;

if someone else needs it is free to use.
Image