aboutfrm.~pas

来自「此软件是八数码软件」· ~PAS 代码 · 共 64 行

~PAS
64
字号
unit AboutFrm;

interface

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

type
  TAboutForm = class(TForm)
    Label1: TLabel;
    Label5: TLabel;
    ConfirmBtn: TButton;
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure ConfirmBtnClick(Sender: TObject);
    procedure FormResize(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  AboutForm: TAboutForm;

implementation

uses EightNumberFrm;

{$R *.dfm}

procedure TAboutForm.ConfirmBtnClick(Sender: TObject);
begin
     Self.Close;
end;

procedure TAboutForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
     //本窗体关闭则令主窗体的Enabled为True
     EightNumber.Enabled := True;
     AboutForm.Release;
end;

procedure TAboutForm.FormResize(Sender: TObject);
begin
     AboutForm.Width := 368;
     AboutForm.Height := 276;
     AboutForm.Top := ( Screen.Height - AboutForm.Height - 50 ) div 2;
     AboutForm.Left := ( Screen.Width - AboutForm.Width ) div 2;
     
end;

procedure TAboutForm.FormShow(Sender: TObject);
begin
     AboutForm.Width := 368;
     AboutForm.Height := 276;
     AboutForm.Top := ( Screen.Height - AboutForm.Height - 50 ) div 2;
     AboutForm.Left := ( Screen.Width - AboutForm.Width ) div 2;
     ConfirmBtn.Left := ( AboutForm.Width - ConfirmBtn.Width ) div 2;
end;

end.

⌨️ 快捷键说明

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