在OnKeyPress里写程序
if Key = VK_RETURN then
  if Edit2.CanFocus then Edit2.SetFocus;

解决方案 »

  1.   

    或者在OnKeyPress里写:
    if Key = VK_RETURN then
      Pefrom(WM_NEXTDLGCTRL,0,0);
      

  2.   

    在OnKeyPress里写程序
    if key=#13 then
       postmessage(对应于onkeypress这个控件的.handle,wm_keydown,vk_tab,0)
      

  3.   

    如果是输入数字的话,就可以在onchange里写
    if len(edit1.text)=规定的最大长度
      then perform(wm_nextdlgctrl,0,0)
      

  4.   

    if key=#13 then form1.activecontrol:=edit2;
      

  5.   

    考,现在老是有人问这种问题,没有办法。
    将ENTER转化为TAB不久行了吗?