unit Unit_Main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
TFrm_Main =
class(TForm)
Panel_Menu: TPanel;
Panel_Content: TPanel;
Btn_Adress_Add: TButton;
Btn_Adress_Edit: TButton;
Btn_Close: TButton;
Button4: TButton;
Btn_Adress_Search: TButton;
Btn_Adress_Delete: TButton;
Btn_Adress_Clear: TButton;
Button8: TButton;
Button9: TButton;
procedure FormCreate(Sender: TObject);
private
newForm: TForm;
procedure ShowForm(aForm: TFormClass);
{ Private-Deklarationen }
public
{ Public-Deklarationen }
Start_first_time:integer;
// Variable die den ersten Start des Programmes speichert.
end;
var
Frm_Main: TFrm_Main;
implementation
uses Unit_Startseite;
{$R *.dfm}
procedure TFrm_Main.FormCreate(Sender: TObject);
begin
// Wurde die LadenSeite schon ausgeführt ?
If Start_first_time = 1
then
begin
// Buttens Einblenden.
Btn_Adress_Add.Visible:=true;
Btn_Adress_Clear.Visible:=true;
Btn_Adress_Edit.Visible:=true;
Btn_Adress_Delete.Visible:=true;
Btn_Adress_Search.Visible:=true;
Btn_Close.Visible:=true;
end
else
begin
ShowForm(TFrm_Startseite);
end;
end;
procedure TFrm_Main.ShowForm(aForm: TFormClass);
var
newFormClass: TFormClass;
begin
newFormClass :=
NIL;
newFormClass := aForm;
if Assigned(newFormClass)
then
begin
newForm := newFormClass.Create(self);
newForm.BorderStyle := bsNone;
newForm.Parent := Panel_Content;
// "In diesem Panel" werden die Forms angezeigt.
newForm.Align := alClient;
newForm.Show;
end;
end;
end.