当光标在指定的 Self.ActiveControl.Name, 我按下ENTER键,焦点移动到指定的控件,

解决方案 »

  1.   

    在onkeypress事件中写上
    if key = #13 then edit2.SetFocus;或if   Key   =   #13   then   {   如果按下了回车键   } 
              begin 
                  Key   :=   #0;   {   吃掉回车键   } 
                  frm.Perform(WM_NEXTDLGCTL,   0,   0);   {   移动到下一个控制   } 
              end; 其中Tab键调次序  
      

  2.   


    要的就是edit2.SetFocus,SetFocus