about.~pas

来自「《Kylix程序设计》一书中附带的例程源代码」· ~PAS 代码 · 共 75 行

~PAS
75
字号
unit About;interfaceuses  SysUtils, Types, Classes, QGraphics, QControls, QForms, QDialogs,  QExtCtrls, QButtons, QStdCtrls;type  TAboutbox = class(TForm)    AboutPanel: TPanel;    ProgramIcon: TImage;    ProductName: TLabel;    Version: TLabel;    Copyright: TLabel;    OKButton: TButton;    LblComments: TLabel;    BtnMore: TButton;    procedure FormCreate(Sender: TObject);    procedure BtnMoreClick(Sender: TObject);  private    { Private declarations }    FLeft: Integer;    FTop: Integer;    FFullHeight: Integer;    FHalfHeight: Integer;    FMore: Boolean;  public    { Public declarations }  end;{var  Aboutbox: TAboutbox;}implementation{$R *.xfm}procedure TAboutbox.FormCreate(Sender: TObject);begin  FLeft := Left;  FTop := Top;  FHalfHeight := 130;  FFullHeight := 190;  ClientHeight := FHalfHeight;  FMore := true;  BtnMore.Caption := 'More >>';end;procedure TAboutbox.BtnMoreClick(Sender: TObject);var  i: Integer;begin  Left := FLeft;  Top := FTop;  if FMore then  begin//    ClientHeight := FFullHeight;    for i := FHalfHeight to FFullHeight do      ClientHeight := i;    BtnMore.Caption := 'Less <<';  end  else  begin//    ClientHeight := FHalfHeight;    for i := FFullHeight downto FHalfHeight do      ClientHeight := i;    BtnMore.Caption := 'More >>';  end;  FMore := not FMore;end;end.

⌨️ 快捷键说明

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