Einzelnen Beitrag anzeigen

Hawkeye219

Registriert seit: 18. Feb 2006
Ort: Stolberg
2.227 Beiträge
 
Delphi 2010 Professional
 
#3

Re: Form-Position einschränken/beschränken

  Alt 21. Jun 2007, 19:51
Hallo Christian,

du kannst die Nachricht WM_WindowPosChanging abfangen:

Delphi-Quellcode:
type
  TForm1 = class (TForm)
    [...]
  private
    procedure WMWindowPosChanging (var aMessage: TWMWindowPosChanging);
      message WM_WINDOWPOSCHANGING;
  end;

procedure TForm1.WMWindowPosChanging (var aMessage: TWMWindowPosChanging);
begin
  inherited;
  with aMessage.WindowPos^ do
    if (y < 75) then
      y := 75;
end;
Gruß Hawkeye
  Mit Zitat antworten Zitat