Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Algorithmen, Datenstrukturen und Klassendesign (https://www.delphipraxis.net/78-algorithmen-datenstrukturen-und-klassendesign/)
-   -   Delphi Hauptformular wechseln (https://www.delphipraxis.net/174338-hauptformular-wechseln.html)

Pandax3 17. Apr 2013 22:43

Hauptformular wechseln
 
Hallo,
ich schaffe es einfach nicht das Hauptformular zu wechseln >.<
Wenn ich unter Optionen mein gewünschtes Formular als Hauptformular anlege, wird dies auch zu Beginn geladen, jedoch lädt lädt die ehemalige Hauptform sich auch mit (Form1) und überdeckt sogar die neue Hauptform. Ich weiß nicht, was ich noch einstellen muss :shock:
Vielleicht kann mir ja jemand helfen ;)

Aviator 17. Apr 2013 22:46

AW: Hauptformular wechseln
 
Schau dir mal den Code der *.dpr Datei deines Projektes an. Ggf. musst du dort noch was ändern. (Ohne Gewähr)

Pandax3 17. Apr 2013 22:53

AW: Hauptformular wechseln
 
Das steht drin

Delphi-Quellcode:
program Project1;

uses
  Forms,
  Unit1 in 'Unit1.pas' {Form1},
  Unit2 in 'Unit2.pas' {Form2},
  Unit3 in 'Unit3.pas' {Form3},
  Unit4 in 'Unit4.pas' {Form4},
  Unit5 in 'Unit5.pas' {Form5},
  Unit6 in 'Unit6.pas' {Form6},
  Unit7 in 'Unit7.pas' {Form7};

{$R *.res}

begin
  Application.Initialize;
  Application.MainFormOnTaskbar := True;
  Application.Title := '';
  Application.CreateForm(TForm7, Form7);
  Application.CreateForm(TForm3, Form3);
  Application.CreateForm(TForm4, Form4);
  Application.CreateForm(TForm1, Form1); // wird immer geladen !
  Application.CreateForm(TForm2, Form2);
  Application.CreateForm(TForm5, Form5);
  Application.CreateForm(TForm6, Form6);
  Application.Run;
end.

Bummi 17. Apr 2013 23:02

AW: Hauptformular wechseln
 
geladen werden alle, Form7 sollte jetzt Dein Hauptform sein.
Kann es sein dass irgendwo einen Fetzen Code in einem OnCreate/Timer/etc. stehen hast der Form1 anzeigt (Show/Visible/BringtoFront/eine Message)oder hast Du die Property visible in Form1 auf true gesetzt?

Pandax3 17. Apr 2013 23:16

AW: Hauptformular wechseln
 
ah danke Bummi,
hatte tatsächlich Form1 auf visible=true stehen ;)
Frag mich nicht warum, habe ich bestimmt mal mit ner anderen Komponente verwechselt :D
Danke

Bummi 17. Apr 2013 23:19

AW: Hauptformular wechseln
 
:thumb:

Sir Rufo 17. Apr 2013 23:29

AW: Hauptformular wechseln
 
Zitat:

Zitat von Bummi (Beitrag 1211838)
geladen werden alle, Form7 sollte jetzt Dein Hauptform sein.
Kann es sein dass irgendwo einen Fetzen Code in einem OnCreate/Timer/etc. stehen hast der Form1 anzeigt (Show/Visible/BringtoFront/eine Message)oder hast Du die Property visible in Form1 auf true gesetzt?

:thumb: Da hat aber jemand seine Kristallkugel gut geputzt :mrgreen:

Bummi 17. Apr 2013 23:37

AW: Hauptformular wechseln
 
@Sir Rufo naja, soviel mehr Möglichkeiten gab es ja nicht ... (notfalls greift ja etc. :mrgreen:)


Alle Zeitangaben in WEZ +1. Es ist jetzt 16:06 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz