unit Unit1;<br><br>interface<br><br>uses<br> Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br> Dialogs;<br><br>type<br> TForm1 = class(TForm)<br> private<br> { Private declarations }<br> protected<br> procedure WMSIZING(var Msg: TMessage); message WM_SIZING;<br> public<br> { Public declarations }<br> end;<br><br>var<br> Form1: TForm1;<br><br>implementation<br><br>{$R *.dfm}<br><br>{ TForm1 }<br><br>procedure TForm1.WMSIZING(var Msg: TMessage);<br>var<br> r: PRect;<br>begin<br> if Msg.wParam = WMSZ_LEFT then<br> begin<br> r := PRect(Msg.LParam);<br> if (r.Right - r.Left) >= Self.Constraints.MaxWidth then<br> r.Left := r.Right - Self.Constraints.MaxWidth;<br> Msg.Result := 1;<br> end<br> else<br> inherited;<br>end;<br><br>end.