Autor Beitrag
matze.de
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 576

Win95, Win98 SE, WinXp Prof SP2
D7P, D8P, FPC2.0
BeitragVerfasst: Fr 30.07.04 16:09 
Hi,
also ich hab ma nen problem. Ich habe 2 Forms(Form1,Form2) dabei ist Form2 die mainform.Die Form2 wird automatisch createt und die Form1 nicht.nun möchte ich per buttonclick in form2 die Form1 Createn ich hab da schon was probiert hab aber nur access violations bekommen :).

mfg matze


Moderiert von user profile iconTino: Topic aus Sonstiges verschoben am Di 10.08.2004 um 16:15

_________________
si tacuisses, philosophus mansisses.
SvenAbeln
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 334
Erhaltene Danke: 3



BeitragVerfasst: Fr 30.07.04 16:24 
Hallo,

was hast du denn schon probiert??

So sollte es funktionieren:

ausblenden Delphi-Quelltext
1:
Application.CreateForm(TForm1,Form1);					


oder auch
ausblenden Delphi-Quelltext
1:
Form1:=TForm1.create(Application);					
matze.de Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 576

Win95, Win98 SE, WinXp Prof SP2
D7P, D8P, FPC2.0
BeitragVerfasst: Fr 30.07.04 16:27 
jo klappt wunderbar das erste danke :)

_________________
si tacuisses, philosophus mansisses.
SvenAbeln
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 334
Erhaltene Danke: 3



BeitragVerfasst: Fr 30.07.04 16:33 
Und wo ist da nun das Problem??

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm2.Button1Click(Sender: TObject);
begin
  Application.CreateForm(TForm1,Form1);
  Form1.Show;
end;


Dies erzeugt das Form1 und zeigt es dann an.