{

  Copyright (c) 1997-2003 by CoolDev.Com. Part of CoolControls package.

}

{$I versions.inc}
unit CoolAboutUnit;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ExtCtrls, StdCtrls, CoolCtrls, ShellApi;

type
  TFormAbout = class(TForm)
    Image: TImage;
    LabelVersion: TCoolLabel;
    LabelCopyright: TCoolLabel;
    LabelName: TCoolLabel;
    LabelCopyright2: TCoolLabel;
    BtnOk: TCoolBtn;
    CoolBevel: TCoolBevel;
    CoolImages: TCoolImages;
    LabelText: TCoolLabel;
    procedure ImageClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  end;

var
  FormAbout: TFormAbout;

implementation

{$R *.DFM}

procedure TFormAbout.ImageClick(Sender: TObject);
begin
  ShellExecute(GetDesktopWindow(), 'open', 'http://www.cooldev.com/', nil, nil, SW_SHOWNORMAL);
end;

procedure TFormAbout.FormCreate(Sender: TObject);
begin
  {$IFNDEF VER90}
  Image.Transparent := True;
  {$ENDIF}
  if Screen.Fonts.IndexOf('Tempus Sans ITC') <> -1 then
  begin
    LabelName.Font.Name := 'Tempus Sans ITC';
    Exit;
  end else
  if Screen.Fonts.IndexOf('Comic Sans MS') <> -1 then
  begin
    LabelName.Font.Name := 'Comic Sans MS';
    Exit;
  end else
  if Screen.Fonts.IndexOf('Arial') <> -1 then
  begin
    LabelName.Font.Name := 'Arial';
  end;
end;

procedure TFormAbout.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  ModalResult := mrOk;
end;

end.
