请问如何使回车键具有tab键的切换功能(例如在一系列edit中)!谢谢

解决方案 »

  1.   

    有没有一个比较简便的办法,不用对每一个edit都写一个事件!
      

  2.   

    form的keypreview设为true
    procedure TFrmMain.FormKeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    begin
      if (key = #13)  then
          begin
            SelectNext(ActiveControl, true, true);
          end;
    end;
      

  3.   

    出现错误:incompatible types!
      

  4.   

    if int(key)=13 then
      SelectNext(ActiveControl, true, true);and
    if ord(key)=13 then
      SelectNext(ActiveControl, true, true);
      

  5.   

    多谢各位!我将#13换成VK_RETURN后成功搞定!!