Beim Starten werden zwei Form geöffnet
- 
					
					
					
					
 Hallo, ich könnte mal eure Hilfe gebrauchen. Ich benutze den Code Gear C++ Builder 10.2 und hab da folgendes Problem: Immer wenn die Datei gestartet wird, werden immer die Form 1 und Form 2 gleich geöffnet. Die Einträge für Form2->Show sind innerhalb der Button-Funktion und können es nicht sein. Woran liegt das? 
 Kann man das irgendwo einstellen?
 
- 
					
					
					
					
 Schau mal in deine Hauptdatei des Projekts. 
 Sind dort mehrereApplication->CreateForm(...);Aufrufe drin? 
 
- 
					
					
					
					
 Das sieht so aus, das ist doch alles richtig oder? #include <vcl.h> 
 #pragma hdrstop
 #include <tchar.h>
 //---------------------------------------------------------------------------
 USEFORM("Unit1.cpp", Form1);
 USEFORM("Unit2.cpp", Form2);
 USEFORM("Unit3.cpp", Form3);
 USEFORM("Unit4.cpp", Form4);
 USEFORM("Unit5.cpp", Form5);
 //---------------------------------------------------------------------------
 int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
 {
 try
 {
 Application->Initialize();
 Application->MainFormOnTaskBar = true;
 Application->CreateForm(__classid(TForm1), &Form1);
 Application->CreateForm(__classid(TForm2), &Form2);
 Application->CreateForm(__classid(TForm3), &Form3);
 Application->CreateForm(__classid(TForm4), &Form4);
 Application->CreateForm(__classid(TForm5), &Form5);
 Application->Run();
 }
 catch (Exception &exception)
 {
 Application->ShowException(&exception);
 }
 catch (...)
 {
 try
 {
 throw Exception("");
 }
 catch (Exception &exception)
 {
 Application->ShowException(&exception);
 }
 }
 return 0;
 }
 //---------------------------
 
- 
					
					
					
					
 Die Unit1 sieht so aus: #include <vcl.h> 
 #pragma hdrstop#include "Unit1.h" 
 #include "Unit2.h"
 #include "Unit3.h"
 #include "Unit4.h"
 #include "Unit5.h"//--------------------------------------------------------------------------- 
 #pragma package(smart_init)
 #pragma resource "*.dfm"
 TForm1 *Form1;String Version = " xxxxxx v 4.0 "; //--------------------------------------------------------------------------- 
 __fastcall TForm1::TForm1(TComponent* Owner)
 : TForm(Owner)
 {
 Label1->Caption=Version;
 Form1->Caption=Version;} 
 //---------------------------------------------------------------------------
 void __fastcall TForm1::Beenden2Click(TObject *Sender)
 {
 exit(0);
 }
 //---------------------------------------------------------------------------
 void __fastcall TForm1::Timer1Timer(TObject *Sender)
 {
 // Uhrzeit/Datum
 StatusBar1->Panels->Items[2]->Text = ( Now().FormatString (" dddd, DD.MM.YYYY HH:NN ").c_str() );
 }
 //---------------------------------------------------------------------------
 void __fastcall TForm1::SpeedButton1Click(TObject *Sender)
 {
 Form2->Show();
 }
 //---------------------------------------------------------------------------void __fastcall TForm1::SpeedButton2Click(TObject *Sender) 
 {
 Form3->Show();
 }
 //---------------------------------------------------------------------------void __fastcall TForm1::SpeedButton3Click(TObject *Sender) 
 {
 Form4->Show();
 }
 //---------------------------------------------------------------------------void __fastcall TForm1::SpeedButton4Click(TObject *Sender) 
 {
 Form5->Show();
 }
 //---------------------------
 
- 
					
					
					
					
 Das lag am Form2->visible, der war true. 
 
