Topic: Set Cursor Focus and Enter Key Handling

How am i able to translate the following script for MVD.

I wish to press enter and to set focus to the next textbox.



Procedure textBox1_KeyDown(object sender, KeyEventArgs e)
    {
      if (e.KeyCode == Keys.Enter)
      {
        textBox2.Focus();
      }
    }

Re: Set Cursor Focus and Enter Key Handling

Hello chrysoco

CAn this be a clue for you ?

procedure frmEmployee_Ctrl_OnKeyDown (Sender: string; var Key: Word; Shift, Alt, Ctrl: boolean);
begin
    if Key=13 then frmEmployee.SetFocusNextControl;
end;

   
begin
    frmEmployee.bSave.Default := False;
end.

JB

Re: Set Cursor Focus and Enter Key Handling

Thanks it worked a lot