unit1.pas

来自「AHM控件包 AHM控件包」· PAS 代码 · 共 59 行

PAS
59
字号
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  AHMSystemClass, AHMTHotSpotManager, ExtCtrls, StdCtrls;

type
  TForm1 = class(TForm)
    Image1: TImage;
    AHMHotSpotManager1: TAHMHotSpotManager;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    procedure AHMHotSpotManager1Click(Sender: TObject;
      HotSpot: TAHMHotSpot);
    procedure AHMHotSpotManager1MouseOver(Sender: TObject;
      HotSpot: TAHMHotSpot);
    procedure AHMHotSpotManager1OverNoHotSpots(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.AHMHotSpotManager1Click(Sender: TObject;
  HotSpot: TAHMHotSpot);
begin
  case Hotspot.ID of
    0 : Showmessage('This could be your Aboutbox');
    1..3 : Showmessage(' This is Hotspot Test number '+Inttostr(Hotspot.ID));
    4 : Showmessage('You are welcome to visit us on the web at http://www.tritontools.com');
    5 : Close;
  else

  end;
end;

procedure TForm1.AHMHotSpotManager1MouseOver(Sender: TObject;
  HotSpot: TAHMHotSpot);
begin
 Label1.Caption:='This Hotspot is called '+HotSpot.Hotspotname;
end;

procedure TForm1.AHMHotSpotManager1OverNoHotSpots(Sender: TObject);
begin
  Label1.Caption:='You are not moving over any Hotspot currently';
end;

end.

⌨️ 快捷键说明

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