![]() |
Form2.Position := poScreenCenter; im onShow?
hoi,
wieso funktioniert das im onshow nicht? ich möchte das wenn form 2 neu aufgerufen wird es wieder in der mitte des bildschirmes ist |
Re: Form2.Position := poScreenCenter; im onShow?
Hey das will ich auch!!!
|
Re: Form2.Position := poScreenCenter; im onShow?
Delphi-Quellcode:
procedure TForm2.FormActivate(Sender: TObject);
begin Left := (Screen.Width - Width) div 2; Top := (Screen.Height - Height) div 2; end; |
Re: Form2.Position := poScreenCenter; im onShow?
danke das geht :mrgreen:
aber wieso geht das mit position nicht? |
Re: Form2.Position := poScreenCenter; im onShow?
Das liegt wohl daran, dass die Position nur einmal festgelegt wird, nämlich, wenn das Formular erstellt wird. Dort wird das Fenster entsprechend des Attributs "Position" ausgerichtet. Ab dann spielt nur noch die aktuelle Position, die vom Anwender eben auch verändert werden kann, eine Rolle, egal, ob man das Fenster zwischendurch schließt usw.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:43 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz