Autor Beitrag
Jojojoxx
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 386



BeitragVerfasst: Sa 22.09.07 23:39 
Hallo!

Wenn ich eine Form zum ersten Mal im Programmablauf mit Form.show aufrufe, geschieht das mit der Vista-typischen Animation. Wenn ich aber im späteren Programmablauf nochmals die Form mit show aufrufe, ist sie direkt da ohne diese Animation. Dabei ist es egal, ob die Form vorher mit .hide oder mit .close geschlossen wurde.
Wie kann ich die Form beim erneuten Aufruf Vista-typisch einblenden lassen?
Danke euch!
mfg

Jojo
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19346
Erhaltene Danke: 1754

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: So 23.09.07 01:24 
Ich würde vermuten, indem du das Formular jedes Mal neu erstellst. Dazu setzt du Action in OnClose auf caFree und schließt das Formular dann ganz normal. Jedoch musst du vor jedem Aufruf des Formulars dieses ggf. neu erstellen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
if Form4 = nil then
  Form4 := TForm4.Create(Self);

Form4.Show;
Ich persönlich lasse Formulare eigentlich gar nicht automatisch erstellen, weil das gerade bei größeren Projekten die Startzeit unnötig verlängert, d.h. ich erstelle sie generell auf diese Weise, wenn sie benötigt werden.