1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
| unit uMain;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs,
FMX.Controls.Presentation, FMX.Edit, FMX.StdCtrls,
{Mine}
uFirst, uTest
;
type
TfMain = class(TForm)
Edit1: TEdit;
Button1: TButton;
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Déclarations privées }
public
{ Déclarations publiques }
end;
var
fMain: TfMain;
implementation
{$R *.fmx}
procedure TfMain.FormCreate(Sender: TObject);
var
L : integer;
begin
//L := fMain.Left;
fMain.Position := TFormPosition.poDesigned; {Permettre la construction hors écran -> ToDo : Vérif Dual Screen -Décalage Haut << meilleure prob.}
//fMain.Left := -fMain.Width;
fMain.Top := -FMain.Height;
//fMain.Hide; {Probablement inutile}
Application.CreateForm(TfFirst, fFirst);
fFirst.ShowModal;
if fFirst.nRes = 0 then
Application.Terminate
else begin
//fMain.Left := L; {Probablement inutile}
fMain.Position := TFormPosition.poScreenCenter;
end;
end;
procedure TfMain.Button1Click(Sender: TObject);
begin
if not (Assigned(fTest)) then
Application.CreateForm(TfTest, fTest);
fTest.Show;
end;
end. |