Autor Beitrag
charlie-kls
Hält's aus hier
Beiträge: 11



BeitragVerfasst: Do 25.05.06 23:10 
Hallo Leute,
ich bin gerade dabei ein Programm zu schreiben, bei dem am Anfang die Form1 mit mehreren Buttons erscheint. Wenn man auf einen Button klickt, soll sich die Form2 öffen. Ich muss 2 Forms machen, weil das Form2 als eigenständiges Programm laufen soll. Kann mir bitte jemand verraten, wie man das gut mit Delohi realisiert?

Thx im voraus!
_frank_
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 343
Erhaltene Danke: 1

Win XP
Delphi 3 Prof / Turbo Delphi Explorer
BeitragVerfasst: Do 25.05.06 23:18 
form2.show;

Gruß Frank
Marc.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1876
Erhaltene Danke: 129

Win 8.1, Xubuntu 15.10

BeitragVerfasst: Do 25.05.06 23:20 
form2 musst natürlich auch noch in die form1 eingebunden werden!
ausblenden Delphi-Quelltext
1:
2:
3:
 implentation
   uses unit2;
  ...
;)
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Do 25.05.06 23:23 
Moin und :welcome: im Forum!

@Vorredner: :mahn:
user profile iconcharlie-kls hat folgendes geschrieben:
weil das Form2 als eigenständiges Programm laufen soll


Dann mußt du das als eigenes Projekt anlegen und diese EXE mit Suche in: Delphi-Forum, Delphi-Library SHELLEXECUTE starten. ;)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
charlie-kls Threadstarter
Hält's aus hier
Beiträge: 11



BeitragVerfasst: Do 25.05.06 23:24 
Thx
_frank_
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 343
Erhaltene Danke: 1

Win XP
Delphi 3 Prof / Turbo Delphi Explorer
BeitragVerfasst: Do 25.05.06 23:27 
versuchst du form2.show im OnCreate des Form1 aufzurufen?
zu diesem Zeitpunkt ist form2 noch nicht erstellt somit der zeiger form2 nicht gültig...musst shon warten bis form2 erstellt ist...z.B. im Projekt-Quelltext:

Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.CreateForm(TForm2, Form2);
form2.show;
Application.Run;

HTH Frank
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Do 25.05.06 23:31 
Moin!

@user profile icon_frank_: :gruebel:
Hast du eigentlich gelesen, was user profile iconcharlie-kls geschrieben hat? ;) Abgesehen davon ist dein Code bedenklich... :?

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
_frank_
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 343
Erhaltene Danke: 1

Win XP
Delphi 3 Prof / Turbo Delphi Explorer
BeitragVerfasst: Do 25.05.06 23:35 
hab das schon gelesen 8) , wollte ihm nur seinen Fehler erklären (wenn es dieser war)
das "thx" war imho auf den anderen Lösungsansatz bezogen... :roll:

Frank
charlie-kls Threadstarter
Hält's aus hier
Beiträge: 11



BeitragVerfasst: Do 25.05.06 23:35 
Danke Leute,
mir hatte nur das uses gefehlt!