Autor Beitrag
HaRaH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 65



BeitragVerfasst: Mi 16.02.05 17:43 
wie kann man per Knopfdruck aus einem Fenster heraus ein neues öffnen?
danke!

Gruß MaX
Sprint
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 849



BeitragVerfasst: Mi 16.02.05 18:30 
Was meinst du mit "Windowsfenster"? Eine neue Form in deinem Programm? Eine neue Explorer Ansicht?

_________________
Ciao, Sprint.
WeBsPaCe
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 2322
Erhaltene Danke: 1

FireFox 3, Internet Explorer 6 SP1
D1, D3Prof, D6Pers, D7Pers+Indy, VisualStudio Express
BeitragVerfasst: Mi 16.02.05 18:44 
Vielleicht so??
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
procedure Blablabla;
var
Fenster: TForm;
begin
Fenster := TForm.Create(Application);
end;

_________________
Steht der Bauer im Gemüse, hat er später grüne Füße.
HaRaH Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 65



BeitragVerfasst: Mi 16.02.05 21:28 
hm - kein Explorerfenster - einfach so eine Unit oder wie das heißt. Ein Fenster eben, dass ich mit in Delphi mit dem Baukastensystem zusammenstellen kann.
msphp
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 20

WIN 2000
D6 Pers
BeitragVerfasst: Do 17.02.05 09:04 
Guten Morgen

Also erstens must du dir ein neues Formular zulegen (Datei>Neu>Formular)
Und dann kannst du das auf Buttonklick dem User auf den Desktop schmeissen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure TForm1.Button1Click(Sender: TObject);
begin
  unit2.Form2:=unit2.TForm2.Create(self);  //Konstruktor für die Variable
  unit2.Form2.Show;                        //Zeigt dann das Formular, da Visible False ist nach Create
end;


Noch zur Erklärung: Unit2 ist die Unit des Neuen Formulars. Damit das funktioniert must du zuerst noch unit2 (oder wie deine Unit dann heisst) bei den uses eintragen, sonst funktioniert das nicht (sonst findet der compiler unit2 nicht)

Hoffe das ist in etwa die Antwort für das was du machen möchtest.

Schönen Tag noch

Michael
Wizard of OS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 19

Win95, Win98, Win2000, WinNT, Win XP
D5
BeitragVerfasst: Mo 21.02.05 19:00 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
with TForm.Create(self) do
try
   ShowModal;
finally
   Free;
end;