AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Probleme beim Zugreifen auf 2. Form

Ein Thema von Acuaplano · begonnen am 28. Jun 2013 · letzter Beitrag vom 28. Jun 2013
 
Acuaplano

Registriert seit: 8. Mai 2013
29 Beiträge
 
#12

AW: Probleme beim Zugreifen auf 2. Form

  Alt 28. Jun 2013, 16:15
Ich hab's eben nochmal mit einem neuen Projekt probiert und entweder ist mein Lazarus verbuggt oder ich mache was falsch:
Neues Projekt erstellt - 2 Formulare - Zweites Formular in's erste eingebunden - Button und Labels darauf platziert und gleiches Problem: tut sich nix

Delphi-Quellcode:
unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, Unit2;

type

  { TForm1 }

  TForm1 = class(TForm)
    Button1: TButton;
    Label1: TLabel;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.Button1Click(Sender: TObject);
begin
  Form2.Label1.Caption := 'Form2';
  Label1.Caption := 'Form1';

end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Form2 := TForm2.Create(self);
  Form2.Show;
end;

end.
Delphi-Quellcode:
unit Unit2;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;

type

  { TForm2 }

  TForm2 = class(TForm)
    Label1: TLabel;
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form2: TForm2;

implementation


{$R *.lfm}

end.
Irgendwas muss ich doch falsch gemacht haben
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:42 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz