unit2.~~pas

来自「精彩编程百例26~50 其中有 控制任务栏 windows底层任务控制 屏保预览」· ~~PAS 代码 · 共 43 行

~~PAS
43
字号
unit Unit2;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Buttons, ExtCtrls, Unit1;

type
  TForm2 = class(TForm)
    Memo1: TMemo;
    procedure BitBtn1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

{$R *.DFM}

procedure TForm2.BitBtn1Click(Sender: TObject);
begin
    Close;
end;

procedure TForm2.FormShow(Sender: TObject);
begin
     Memo1.Lines.Clear;
     Memo1.Lines.Add(FloatToStr(DirsCount)+' folders ');
     Memo1.Lines.Add(FloatToStr(FilesCount)+' files '
                    +FloatToStr(FilesSize)+' bytes');
     Memo1.Lines.Add(FloatToStrF(FilesSize/1024, ffNumber, 12, 2)+' kilobytes');
     Memo1.Lines.Add('In tree '+Form1.DirectoryListBox1.Directory);
end;

end.

⌨️ 快捷键说明

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