四个方向键(left,right,up ,down)来转移控件之间的焦点,谢谢大家帮忙

解决方案 »

  1.   

    你要怎么移动呢,类似这样可以在按下向下或向右方向键时移到下一个控件(TAB顺序)Form.OnKeyPress事件中if (Key = char(VK_RIGHT)) or (Key = char(VK_DOWN)) then  
      SendMessage(self.Handle, WM_NEXTDLGCTL, 0, 0);
      

  2.   

    procedure TfrmChargeAREdit.edtKeyUp(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    begin
      inherited;
      case Key of
        VK_LEFT: Perform(WM_NEXTDLGCTL, 1, 0);//向前
        VK_RIGHT: Perform(WM_NEXTDLGCTL, 0, 0);//向后
      end;
    end;
      

  3.   

    同意
       tjianliang(乡关何处)