Man sollte vielleicht noch auf Veränderungen reagieren:
Delphi-Quellcode:
// Form-Deklaration
Procedure Adjust;
Procedure WMSETTINGCHANGE(Var Msg: TMessage); message WM_SETTINGCHANGE;
Procedure WMDISPLAYCHANGE(Var Msg: TMessage); message WM_DISPLAYCHANGE;
...
Procedure TForm1.WMSETTINGCHANGE(Var Msg: TMessage);
Begin
If Msg.WParam = SPI_SETWORKAREA Then Adjust;
End;
Procedure TForm1.WMDISPLAYCHANGE(Var Msg: TMessage);
Begin
Adjust;
End;
Procedure TForm1.Adjust;
Var WorkArea: TRect;
Begin
SystemParametersinfo(SPI_GETWORKAREA,0,@WorkArea,0);
Left := WorkArea.Right-Width;
Top := WorkArea.Bottom-Height;
End;
Gruß, teebee