Class TfrmRestrictSize (unit UnitMain) |
TForm
This example show how you can specify the minimum and maximum sizes of a window, showing it directly to the user by blocking him during resize. It also shows predefined size and position of windows when Maximizing it.
Constructors |
Functions |
procedure TfrmRestrictSize.
Properties |
Events |
Variables |
Constructors |
Functions |
This represents the maximum size of the Window
You must handle the WM_GETMINMAXINFO message
procedure TfrmRestrictSize.RestrictSize(var Msg: TMessage); var p: ^TPoint; begin p := Pointer(Msg.lParam+1* SizeOf(TPoint)); p^.x := 450; p^.y := 450; p := Pointer(Msg.lParam+2* SizeOf(TPoint)); p^.x := 200; p^.y := 200; p := Pointer(Msg.lParam+3* SizeOf(TPoint)); p^.x := 320; p^.y := 200; p := Pointer(Msg.lParam+4* SizeOf(TPoint)); p^.x := 640; p^.y := 480; end;
Public declarations
Properties |
Events |
Variables |