Autor Beitrag
hedie
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 249

WIN XP WIN 2000 WIN Longhorn
D7 Pers D2005 Architect Vollversion
BeitragVerfasst: So 24.04.05 20:11 
Hallo zusammen

weshalb funktioniert das nicht:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.FormCreate(Sender: TObject);
begin
Form2.Show
end;


es kommt danach zugrifsverletzung in nr. .....

wie kann ich gleich nach starten meiner ersten form (form1) die zweite anzeigen lassen (form2)?

grüsse
Claudio

_________________
Grüsse hedie
hört auf traurig zusein hört lieber radio Basilisk
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: So 24.04.05 20:14 
Du kannst keine Form aufrufen, das noch gar nicht erstellt wurde.
In FormCreate wird ja erst die 1. Form erstellt, danach die 2. Form.
Also kannst du nicht, wenn die 1. Form erstellt wird, die 2. Form aufrufen, die noch nicht existiert.

Du kannst aber einen Timer auf deine 1. Form tun, der z.B. auf 10 MS gestellt ist und dann Form2 aufruft.

ausblenden Delphi-Quelltext
1:
2:
Timer1.Enabled := False;
Form2.Show;

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
hedie Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 249

WIN XP WIN 2000 WIN Longhorn
D7 Pers D2005 Architect Vollversion
BeitragVerfasst: So 24.04.05 20:16 
dann würde der timer aber tausend mal die form2 öffnen

_________________
Grüsse hedie
hört auf traurig zusein hört lieber radio Basilisk
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: So 24.04.05 20:17 
user profile iconGTA-Place hat folgendes geschrieben:
ausblenden Delphi-Quelltext
1:
2:
Timer1.Enabled := False;
Form2.Show;


Dafür steht ja das im Timer. Der Timer läuft genau 1 mal durch und ist dann nicht mehr Aktiv.

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
hedie Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 249

WIN XP WIN 2000 WIN Longhorn
D7 Pers D2005 Architect Vollversion
BeitragVerfasst: So 24.04.05 20:20 
sorry

ok hat geklappt
danke :D

_________________
Grüsse hedie
hört auf traurig zusein hört lieber radio Basilisk
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: So 24.04.05 22:15 
ausserdem muss eine form, um 2 mal zu erscheinen, auch zmal creted werden. wenn du 2 mal Form2.show machst, passiert nüx.

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.