Oupss, voila voilou le code des 3 fiches:
Unité principale: uCours
Citation :
unit uCours;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, jpeg, ExtCtrls, StdCtrls;
type
TfmCours = class(TForm)
btMaths: TButton;
btSVT: TButton;
btPhysique: TButton;
Label1: TLabel;
btChimie: TButton;
btQuitter: TButton;
procedure btMathsClick(Sender: TObject);
procedure btQuitterClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
fmCours: TfmCours;
implementation
uses uMaths;
{$R *.dfm}
procedure TfmCours.btMathsClick(Sender: TObject);
begin
fmMaths.showmodal
end;
procedure TfmCours.btQuitterClick(Sender: TObject);
begin
close;
end;
end.
Unité pour les maths: uMaths
Citation :
unit uMaths;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TfmMaths = class(TForm)
btFonctions1: TButton;
btSuites: TButton;
btPolynomes: TButton;
btRetour: TButton;
procedure btFonctions1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
fmMaths: TfmMaths;
implementation
uses uFonctions1;
{$R *.dfm}
procedure TfmMaths.btFonctions1Click(Sender: TObject);
begin
fmFonctions1.showmodal
end;
end.
Unité première pour les fonctions:
Citation :
unit uFonctions1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, jpeg, ExtCtrls;
type
TfmFonctions1 = class(TForm)
Label1: TLabel;
btRetour: TButton;
Memo1: TMemo;
Label2: TLabel;
Label3: TLabel;
Memo2: TMemo;
Label4: TLabel;
Memo3: TMemo;
btSuite: TButton;
Label5: TLabel;
private
{ Private declarations }
public
{ Public declarations }
end;
var
fmFonctions1: TfmFonctions1;
implementation
uses uFonctions2;
{$R *.dfm}
end.
La fiche suivante est uFonctions2 ( name: fmFonctions2 ). Le boutton btSuite doit fermer fmFonctions1 et ouvrir fmFonctions2.