Hallo,
dein Problem ist folgendes: dein Project (nennen wir es Project1) erzeugt erst Form1 (Form1.create) und danach Form2 (Form2.create). Deine Anwendung will auf Form2 zugreifen, wenn sie noch gar nicht existiert. Meine Lösung:
1. mit der rechten Maustaste auf Project1.exe in der Projektverwaltung klicken
2. Quelltext auswählen
3. erst Form2 erstellen, dann Form1:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15:
| program Project1;
uses Forms, Unit1 in 'Unit1.pas' , Unit2 in 'Unit2.pas' ;
{$R *.res}
begin Application.Initialize; Application.CreateForm(TForm2, Form2); Application.CreateForm(TForm1, Form1); Application.Run; end. |