baseform.pas

来自「1、系统环境要求:WindowsXP/2000 2、DELPHI7.0企业版 」· PAS 代码 · 共 40 行

PAS
40
字号
unit baseform;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  Tf_baseform = class(TForm)
    procedure FormKeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
  private
    { Private declarations }
  public
    procedure FindNext(Dir: Boolean);virtual;
    { Public declarations }
  end;

var
  f_baseform: Tf_baseform;

implementation

{$R *.dfm}

procedure Tf_baseform.FindNext(Dir: Boolean);
begin
  FindNextControl(ActiveControl,Dir,False,False).SetFocus;
end;

procedure Tf_baseform.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  if Key = vk_Escape then
    Close;
end;

end.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?