Autor Beitrag
Karstadt
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 174

Windows 2000 / XP
Delphi 7 Pro
BeitragVerfasst: Di 06.12.05 12:58 
Tf_xyz.Create(Self); nun öffnet sich das Form. Mein Ziel ist es, ein Form erstellen, dann eine Funktion die sich in diesen Form befindet ausführen und dan das Fenster mit ShowModal öffnen. Wie geht das?

ausblenden Delphi-Quelltext
1:
2:
3:
Tf_xyz.Create;
f_xyz.funktionxyz(string);
f_xyz.showmodall;


??

Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt.
Martin1966
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1068

Win 2000, Win XP
Delphi 7, Delphi 2005
BeitragVerfasst: Di 06.12.05 13:00 
user profile iconKarstadt hat folgendes geschrieben:
ausblenden Delphi-Quelltext
1:
2:
3:
Tf_xyz.Create;
f_xyz.funktionxyz(string);
f_xyz.showmodall;

Ja, genau so. ;-)

Lg Martin

Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt.

_________________
Ein Nutzer der Ecke ;-)
Karstadt Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 174

Windows 2000 / XP
Delphi 7 Pro
BeitragVerfasst: Di 06.12.05 13:12 
beim Create sagt der mir, nicht genügend wirkliche Paramter;
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6393
Erhaltene Danke: 147

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Di 06.12.05 13:15 
Stimmt ja auch.
So ist es besser:
ausblenden Delphi-Quelltext
1:
2:
3:
f_xyz := Tf_xyz.Create(self); // Kannst z.B. auch ein Fenster angeben, statt self
f_xyz.funktionxyz(string);
f_xyz.showmodal;
PSi
Hält's aus hier
Beiträge: 6



BeitragVerfasst: Di 06.12.05 13:51 
Hallo,

sorry aber, geht das auch nicht so?

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
 Try
  Application.CreateForm(TForm2, Form2);
 Except
  Showmessage('Fehler');
 End;
 Form2.Left := Screen.Width  + 10;
 Form2.Top  := Screen.Height + 10;
 Form2.Show;


Man muss halt nur noch die automatische Erstellung des 2 Formulars unter den Projektoptionen verhindern ...

Gruß
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6393
Erhaltene Danke: 147

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Di 06.12.05 13:59 
user profile iconPSi hat folgendes geschrieben:
sorry aber, geht das auch nicht so?

So geht das auch.
user profile iconPSi hat folgendes geschrieben:
Man muss halt nur noch die automatische Erstellung des 2 Formulars unter den Projektoptionen verhindern ...

Das wäre schon besser. Übrigens auch bei meinem Beispiel.
Karstadt Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 174

Windows 2000 / XP
Delphi 7 Pro
BeitragVerfasst: Di 06.12.05 15:14 
bei mir stimmt irgendwas nicht.

ausblenden Delphi-Quelltext
1:
2:
3:
f_xyz := Tf_xyz.Create(self); // Fenster geht auf
f_xyz.funktionxyz(string);
f_xyz.showmodal; //fehlermeldung aus sichbaren Fenster kann kein Modales gemacht werden.


Da muss ich doch nur die Eingenschaft VISIBLE au False setzen? Richtig?

Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt.
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6393
Erhaltene Danke: 147

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Di 06.12.05 15:17 
user profile iconKarstadt hat folgendes geschrieben:
Da muss ich doch nur die Eingenschaft VISIBLE au False setzen? Richtig?

Ja. Hatte ich dir das nicht letztes mal schon gesagt, oder war es jemand anderes? :gruebel:
Ivo@CoMRoK
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 258

Win XP
D3 Prof., D7 Pe.
BeitragVerfasst: Fr 09.12.05 21:34 
Ja?
Also ich glaub mit Form1.Visible:=False geht das nicht :lol:
Also ich würde das ja mit Form1.Hide und .Show machen :wink:
mfg Ivo

_________________
Fällt der Bauer tot vom Traktor, stand am Waldrand ein Reaktor.
Ein altes indianisches Sprichwort besagt:Es kann gefährlich sein gelben Schnee zu essen.
mmmichael
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Fr 09.12.05 21:40 
user profile iconIvo@CoMRoK hat folgendes geschrieben:
Also ich glaub mit Form1.Visible:=False geht das nicht :lol:
Also ich würde das ja mit Form1.Hide und .Show machen :wink:

Wo besteht denn da bitte ein Unterschied?! :?
Ivo@CoMRoK
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 258

Win XP
D3 Prof., D7 Pe.
BeitragVerfasst: Fr 09.12.05 21:42 
Probier doch mal Form1.Visible:=False aus :!:
Da passiert gar nichts! Oder besser: Das Fenster wird eben angezeigt!!! :D
mfg Ivo

_________________
Fällt der Bauer tot vom Traktor, stand am Waldrand ein Reaktor.
Ein altes indianisches Sprichwort besagt:Es kann gefährlich sein gelben Schnee zu essen.