unit AboutFrm;

interface

uses
  Windows, ShellAPI, Forms, Controls,
  Classes, StdCtrls, ExtCtrls, Graphics,
  SysUtils, ZhAPI;

type
  TAboutForm = class(TForm)
    lblSoftType: TLabel;
    lblSoftName: TLabel;
    lblVersionName: TLabel;
    lblVersion: TLabel;
    lblCopyright: TLabel;
    Label6: TLabel;
    Label7: TLabel;
    lblCopyrightAge: TLabel;
    Label13: TLabel;
    lblPhone: TLabel;
    Label15: TLabel;
    lblWebSite2: TLabel;
    lblCompany: TLabel;
    Panel1: TPanel;
    Image1: TImage;
    Panel2: TPanel;
    Button1: TButton;
    Panel3: TPanel;
    lblSoftware: TLabel;
    lblQQ: TLabel;
    procedure lblWebSite2Click(Sender: TObject);
    procedure lblWebSite2MouseEnter(Sender: TObject);
    procedure lblWebSite2MouseLeave(Sender: TObject);
    procedure lblEmail2Click(Sender: TObject);
    procedure lblEmail2MouseEnter(Sender: TObject);
    procedure lblEmail2MouseLeave(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

  procedure ShowAboutForm;

implementation

{$R *.dfm}

procedure ShowAboutForm;
var
  AboutBox: TAboutForm;
begin
  AboutBox := TAboutForm.Create(nil);
  AboutBox.ShowModal;
  AboutBox.Free;
end;

procedure TAboutForm.lblWebSite2Click(Sender: TObject);
begin
  ShellExecute(Handle, nil, PChar(lblWebSite2.Caption), nil, nil, SW_SHOWNORMAL);
end;

procedure TAboutForm.lblWebSite2MouseEnter(Sender: TObject);
begin
  TLabel(Sender).Font.Color := clHighLight;
  Screen.Cursor := crHandPoint;
end;

procedure TAboutForm.lblWebSite2MouseLeave(Sender: TObject);
begin
  TLabel(Sender).Font.Color := clHotLight;
  Screen.Cursor := crDefault;
end;

procedure TAboutForm.lblEmail2Click(Sender: TObject);
begin
  Shellexecute(Handle, 'open',
    'mailto:"纵横客服中心"<support@smartcost.com.cn>?subject=关于SmartCost的反馈',
    '关于SmartCost的反馈', '', SW_SHOW);
end;

procedure TAboutForm.lblEmail2MouseEnter(Sender: TObject);
begin
  TLabel(Sender).Font.Color := clHighLight;
  Screen.Cursor := crHandPoint;
end;

procedure TAboutForm.lblEmail2MouseLeave(Sender: TObject);
begin
  TLabel(Sender).Font.Color := clHotLight;
  Screen.Cursor := crDefault;
end;

procedure TAboutForm.FormCreate(Sender: TObject);
begin
  lblVersion.Caption := GetExeFileVersion(ParamStr(0));
  lblSoftName.Caption := Application.Title;
end;

end.
