procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word;Shift:TShiftState);
begin  
if Key=VK_PRIOR OR Key=VK_NEXT THEN
begin
   ......
end;

解决方案 »

  1.   

    procedure TIPQC.D_SCXKeyPress(Sender: TObject; var Key: Word;Shift:TShiftState);
    begin
    //   if (Key=VK_PRIOR) or (Key=VK_NEXT) THEN
       showmessage('');
    end;老兄,这样没反应啊
      

  2.   

    sorry,应该是这样:
    procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    begin
    if Key in [VK_PRIOR,VK_NEXT] then
           ShowMessage('Page Up Is'+IntToStr(Key));
    end;
      

  3.   

    procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    begin
      case Key of
        VK_PRIOR: Caption := 'Page Up';
        VK_NEXT: Caption := 'Page Down';
      end;
    end;