unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    AHMAppStarter1: TAHMAppStarter;
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Button4: TButton;
    Button5: TButton;
    Button6: TButton;
    procedure Button5Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
    procedure Button6Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button5Click(Sender: TObject);
begin
  close;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  AHMAppStarter1.Execute(0);
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
  with AHMAppStarter1.Programs.Add do
  //creates the new executeable item
  try
    ExeFile:=Application.Exename;
    Execute;
  finally
    Free;
  //removes this item again
  end;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  AHMAppStarter1.Execute(1);
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
  AHMAppStarter1.Execute(2);
end;

procedure TForm1.Button6Click(Sender: TObject);
begin
  AHMAppStarter1.Execute(3);

end;

end.
