Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Form Anzeigen bringt Fehler (https://www.delphipraxis.net/54735-form-anzeigen-bringt-fehler.html)

maximus Caesar 10. Okt 2005 18:04


Form Anzeigen bringt Fehler
 
Hallo!
Ich habe gerade in mein Programm eine neue Form (Form3) eingefügt.
Soblad ich sie anzeigen lassen will, egal ob mit schow oder schowmodal bekomme ich eine Dialogbox mit einer Zugriffsverletzung.

In Delphi wird mir aber keine Fehlermeldung angezeigt.

meine Projektdatei sieht so aus:
Delphi-Quellcode:
program GeburtstagsKalender;

uses
  Forms,
  Unit1 in 'Unit1.pas' {Form1},
  Unit2 in 'Unit2.pas' {Form2},
  Unit3 in 'Unit3.pas' {Form3},
  tok in 'tok.pas';

{$R *.RES}

begin
  Application.Initialize;
  Application.CreateForm(TForm2, Form2);
  Application.CreateForm(TForm3, Form3);
  Application.Run;
end.
Form1 wird erst später erzeugt.

Kann mir jemand sagen, was ich machen muss?

maximus Caesar 10. Okt 2005 18:12

Re: Form Anzeigen bringt Fehler
 
OK, Fehler gefunden!!!!

Neu:
Delphi-Quellcode:
begin
  Application.Initialize;
  Application.CreateForm(TForm3, Form3);
  Application.CreateForm(TForm2, Form2);
Alt:
Delphi-Quellcode:
begin
  Application.Initialize;
  Application.CreateForm(TForm2, Form2);
  Application.CreateForm(TForm3, Form3);

Sharky 10. Okt 2005 18:13

Re: Form Anzeigen bringt Fehler
 
Hai Du,

wie sieht denn das OnCreate bzw. OnShow deiner Form3 aus?
Versuchst Du dort womöglich auf ein Objekt aus Form1 zu zugreifen?

maximus Caesar 10. Okt 2005 19:30

Re: Form Anzeigen bringt Fehler
 
Da is nichts drinn!

Form3 dient nur zur Anzeige von Informationen, wie z.B. Das Copyright


Alle Zeitangaben in WEZ +1. Es ist jetzt 20:23 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