unit Maxform;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
Forms, Dialogs;
type
TMaxForm = class(TForm)
private
{ Private declarations }
fmh, fmw, fml, fmt : word;
procedure mymax(var m: TWMGETMINMAXINFO);
message wm_getminmaxinfo;
published
property maxheight : word read mh write mh;
property maxwidth : word read mw write mw;
property maxleft : word read ml write ml;
property maxtop : word read mt write mt;
constructor create(AOwner : TComponent); override;
end;
implementation
procedure TMaxFo(var m : TWMGETMINMAXINFO);
begin
m.minmaxinfo^.ptmaxsize.x := fmw;
m.minmaxinfo^.ptmaxsize.y := fmh;
m.minmaxinfo^.ptmaxposition.x := fml;
m.minmaxinfo^.ptmaxposition.y := fmt;
end;
constructor TMaxForm.create(Aowner : TComponent);
begin
fmw := screen.width;
fmh := screen.height;
fmt := 0;
fml := 0;
inherited create(aowner);
end;
end.