unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, AHMTPresentation, ExtCtrls, AHMTButton, AHMTBackground,
  AHMTLabel;

type
  TForm1 = class(TForm)
    AHMFormSlide1: TAHMFormSlide;
    ComboBox1: TComboBox;
    AHMBackground1: TAHMBackground;
    AHMButton1: TAHMButton;
    AHMButton2: TAHMButton;
    AHMButton3: TAHMButton;
    AHMButton4: TAHMButton;
    Bevel1: TBevel;
    Label1: TLabel;
    AHMLabel1: TAHMLabel;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure ComboBox1Change(Sender: TObject);
    procedure FormResize(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

uses Unit2, Unit3, Unit4;

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
begin
 try
   AHMFormSlide1.Show(Form2);
 finally
   AHMButton1.Enabled:=False;
   AHMButton2.Enabled:=True;
   AHMButton3.Enabled:=True;
   AHMButton4.Enabled:=False;
 end;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  try
    AHMFormSlide1.Show(Form3);
  finally
   AHMButton1.Enabled:=True;
   AHMButton2.Enabled:=False;
   AHMButton3.Enabled:=True;
   AHMButton4.Enabled:=True;
  end;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
  try
    AHMFormSlide1.Show(Form4);
  finally
   AHMButton1.Enabled:=True;
   AHMButton2.Enabled:=true;
   AHMButton3.Enabled:=False;
   AHMButton4.Enabled:=True;
  end;
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
  try
    AHMFormSlide1.ShowInstance(TForm2);
  finally
   AHMButton1.Enabled:=False;
   AHMButton2.Enabled:=True;
   AHMButton3.Enabled:=True;
   AHMButton4.Enabled:=False;
  end;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Combobox1.Itemindex:=14;
  AHMFormSlide1.SlideEffect:=TAHMSlideeffects(14);
end;

procedure TForm1.ComboBox1Change(Sender: TObject);
begin
  AHMFormSlide1.SlideEffect:=TAHMSlideEffects(Combobox1.Itemindex);
end;

procedure TForm1.FormResize(Sender: TObject);
begin
  if AHMFormSlide1.CurrentForm<>nil then
  begin
  AHMFormSlide1.CurrentForm.Align:=alClient;
  AHMFormSlide1.CurrentForm.Align:=alNone;
  end;
end;

end.
