unit Main;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Menus, FIBDBLoginDlg;

type
  TMainForm = class(TForm)
    MainMenu1: TMainMenu;
    Forms1: TMenuItem;
    FirstForm1: TMenuItem;
    SecondForm1: TMenuItem;
    Exit1: TMenuItem;
    procedure FirstForm1Click(Sender: TObject);
    procedure SecondForm1Click(Sender: TObject);
    procedure Exit1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  MainForm: TMainForm;

implementation

uses Unit1, Unit2;

{$R *.DFM}

procedure TMainForm.FirstForm1Click(Sender: TObject);
begin
 if Form1=nil then
  Application.CreateForm( TForm1,Form1)
 else begin
  Form1.WindowState:=wsNormal
 end;
 {$IFDEF VER130}
 with Form1.Constraints do begin
  MaxHeight:=MinHeight;
  MinWidth :=MaxWidth;
  Form1.BringToFront;
 end;
 {$ENDIF}
end;

procedure TMainForm.SecondForm1Click(Sender: TObject);
begin
 if Form2=nil then
  Application.CreateForm( TForm2,Form2)
 else begin
  Form2.WindowState:=wsNormal
 end;
 {$IFDEF VER130}
 with Form2.Constraints do begin
//  MaxHeight:=MinHeight;
//  MinWidth :=MaxWidth;
  Form2.BringToFront;
 end;
 {$ENDIF}
end;

procedure TMainForm.Exit1Click(Sender: TObject);
begin
 Close
end;

procedure TMainForm.FormCreate(Sender: TObject);
begin
  Caption := 'FIBPlus Example - ' + Application.Title;
end;

end.
