home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Delphi Programming Unleashed
/
Delphi_Programming_Unleashed_SAMS_Publishing_1995.iso
/
misc
/
explorer
/
about.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-03-20
|
2KB
|
111 lines
unit About;
{ Program copyright (c) 1995 by Charles Calvert & Steve Teixeira }
{ Project Name: EXPLORER }
interface
uses
WinTypes, WinProcs, SysUtils, Classes, Graphics,
Forms, Controls, StdCtrls, Buttons, ToolHelp,
Messages, ExtCtrls;
type
TAboutDlg = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
BitBtn1: TBitBtn;
Bevel1: TBevel;
Label4: TLabel;
Label5: TLabel;
Bevel2: TBevel;
Label6: TLabel;
Label7: TLabel;
Image1: TImage;
Timer1: TTimer;
Label8: TLabel;
FaceHits: TLabel;
procedure BitBtn1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure Image1Click(Sender: TObject);
procedure FormDblClick(Sender: TObject);
procedure FormActivate(Sender: TObject);
private
NumHits : Longint;
procedure StartFace(var M: TWMChar); message wm_Char;
public
{ Public declarations }
end;
var
AboutDlg: TAboutDlg;
implementation
{$R *.DFM}
procedure TAboutDlg.BitBtn1Click(Sender: TObject);
begin
Timer1.Enabled := False;
Close;
end;
procedure TAboutDlg.StartFace(var M: TWMChar);
begin
if M.CharCode = 73 then
begin
Timer1.Enabled := True;
Image1.Visible := True;
end;
inherited;
end;
procedure TAboutDlg.Timer1Timer(Sender: TObject);
begin
Image1.Left := Image1.Left + 2;
if Image1.Left = ClientRect.Right then
begin
Timer1.Enabled := False;
Image1.Visible := False;
Image1.Left := 0;
end;
end;
procedure TAboutDlg.Image1Click(Sender: TObject);
begin
FaceHits.Visible := True;
Inc(NumHits);
Label8.Caption := IntToStr(NumHits);
Label8.Visible := True;
end;
procedure TAboutDlg.FormDblClick(Sender: TObject);
begin
Timer1.Enabled := True;
Image1.Visible := True;
end;
procedure TAboutDlg.FormActivate(Sender: TObject);
var
Info: TSysHeapInfo;
W: word;
S: String;
begin
FaceHits.Visible := False;
NumHits := 0;
Label8.Visible := False;
Info.dwSize := SizeOf(TSysHeapInfo);
SystemHeapInfo(@Info);
W := Info.wUserFreePercent;
Str(W, S);
Label6.Caption := S + '%';
W := Info.wGDIFreePercent;
Str(W, S);
Label7.Caption := S + '%';
Image1.Visible := False;
Image1.Left := 0;
end;
end.