Autor Beitrag
Grinarn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Mo 24.09.07 19:02 
Moin Moin,

ich habe folgendes Problem:
Ich will, dass bei meinem Programm sofort mit dem Main Formular ein zweites Fenster per Showmodal angezeigt wird. Dort soll der Benutzer dann einen Spieler auswählen und sobald er OK drückt startet das Spiel im Main Formular. Soweit sogut.

Ich habe nun also im Main Formular im OnCreate Ereignis das zweite Formular eingebunden:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure TFrmMain.start(Sender: TObject);
begin
  initgame;  //Testweise
  if FrmSpielerwahl.ShowModal = mrOk then
  begin
    // Bla bla
  end;
end;


Allerdings haut er mich dann sofort beim Compilieren mit einer AccesViolation Fehlermeldung raus. Jmd eine Idde wodran das liegen könnte und wie ich das einbinden muss, damit das so funktioniert wie ich mir das vorstelle?

Gruß Grinarn

Moderiert von user profile iconNarses: Delphi-Tags hinzugefügt
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mo 24.09.07 19:05 
Moin!

user profile iconGrinarn hat folgendes geschrieben:
Ich habe nun also im Main Formular im OnCreate Ereignis das zweite Formular eingebunden:

Zu diesem Zeitpunkt existieren weitere Formulare idR noch nicht, also nimm einfach FormShow! :idea: ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
Grinarn Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Mo 24.09.07 19:08 
Wenn man den Wald vor lauter Bäumen nicht sieht.... Danke dir