Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Forms in Projekt einbinden, die über C&P eingefügt wurden (https://www.delphipraxis.net/11827-forms-projekt-einbinden-die-ueber-c-p-eingefuegt-wurden.html)

Matze 14. Nov 2003 13:30


Forms in Projekt einbinden, die über C&P eingefügt wurde
 
Hi!

Ich hab eine Form erstellt und möchte genau dieselbe bloß leicht abgeändert haben.

Jetzt hab ich gedacht, ich kopiere die Form-Dateien, benenne sie um und füge sie wieder in den Projektordner ein.

Nun ist dieses Formular nicht bei "Projekt - Optionen" aufgeführt.
Ein Frame kann ich nicht verwenden, da ich das Formular ja abändern möchte.

Ich könnte ja auch eine neue Form erstellen und die Kompos kopieren, aber wieso geht das nicht so?

Weiß jemand Rat?

himitsu 14. Nov 2003 13:41

Re: Forms in Projekt einbinden, die über C&P eingefügt w
 
Name des Formulars ändern (z.B. von "Form1" in "Form2")
Unit speichern unter (z.B. von "Unit1.pas" als "Unit2.pas")
Projektdatei ändern:
Delphi-Quellcode:
{***** von *****}
Program Project1;

Uses Forms,
  Unit2 in 'Unit2.pas' {Form1};

Begin
  Application.Initialize;
  Application.CreateForm(TForm2, Form2);
  Application.Run;
End.

{***** nach *****}
Program Project1;

Uses Forms,
  Unit1 in 'Unit1.pas' {Form1},
  Unit2 in 'Unit2.pas' {Form2};

Begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.CreateForm(TForm2, Form2);
  Application.Run;
End.
Projektdatei speichern

Und zuletzt das Projekt neu öffnen

Matze 14. Nov 2003 13:48

Re: Forms in Projekt einbinden, die über C&P eingefügt w
 
Wow, vielen Dank, es geht!! :thumb:


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