Hallo,
schau dir das mal an:
Delphi-Quellcode:
unit DemoFrm;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls;
type
TDemoForm =
class(TForm)
StatusBar: TStatusBar;
procedure FormCreate(Sender: TObject);
private
procedure UpdateConstraints;
procedure WMSettingChange(
var Msg: TMessage);
message WM_SETTINGCHANGE;
end;
var
DemoForm: TDemoForm;
implementation
{$R *.dfm}
procedure TDemoForm.UpdateConstraints;
begin
with Constraints, Screen
do
begin
MaxHeight := WorkAreaHeight;
MaxWidth := WorkAreaWidth;
end;
end;
procedure TDemoForm.FormCreate(Sender: TObject);
begin
UpdateConstraints;
end;
procedure TDemoForm.WMSettingChange(
var Msg: TMessage);
begin
UpdateConstraints;
end;
end.
So kannst du zur Laufzeit auf AppBars reagieren.
Grüße vom marabu
Nachtrag: Ich sehe du hast eine neue Delphi-Version, da kannst du auch einfach mit TApplicationEvents.OnSettingChange arbeiten.