随便在KeyUp、KeyDown、KeyPress事件中完成
(最好有代码)

解决方案 »

  1.   

    procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    begin
      if (Key =39) or (Key = 37) then
        Key := 0;
    end;
    这里仅限在一个Edit编辑框内,如果说你想处理整个系统的就需要使用Hook
      

  2.   

    查一下左右的两个光标键的键值,我记不清了.
    if key=#键值 then
     key:=#0;
      

  3.   

    if ...... then
      exit;
    楼上的说的可以了,你还可以拦截键盘消息.
      

  4.   

    补充 KeyDown里不加#、KeyPress里加#号
      

  5.   

    Keyup里写
      if (Key =#39) or (Key = #37) then
        Key := #0;