Unit GMMinmax

Renamed from MinMax.pas 6/14/1998 Paul Rice to avoid conflicts with others' work. // Component to limit the size that a form can be resize to. Used by simply placing the component on the form, setting the required size limits, and setting to active. // Works by adding a new WndProc which looks for the WM_GETMINMAXINFO message. This has the lParam pointing to a TMinMaxInfo record which contains size information as follows: ptMaxSize - Specifies the maximized width (point.x) and the maximized height (point.y) of the window. ptMaxPosition - Specifies the position of the left side of the maximized window (point.x) and the position of the top of the maximized window (point.y). ptMinTrackSize- Specifies the minimum tracking width (point.x) and the minimum tracking height (point.y) of the window. ptMaxTrackSize- Specifies the maximum tracking width (point.x) and the maximum tracking height (point.y) of the window. // Therefore there are eight coordinates which can be modified. When the new WndProc is called, these values can be modified by values preset as properties within the component. The size limiting behaviour can be turned on and off by an Active property. An event may be called, after the component has modified the TMinMaxInfo record, but before it is used by windows in resizing the window, thus the user can make further adjustments to the form size. After resizing, the form's OnResize event is fired. // Use the SettingMin and SettingMax properties at design time to drag the window to the required minimum and then required maximum size. // This component controls the form size, not the client size. // NB This component will "fight" with to TAspect component. The second of this and TAspect placed on a form will win. // Version 1.00 Grahame Marsh 19 January 1997: Initial component // Version 1.10 Colin Dawson 15 September 1997 Bug fixed - previously allowed track resize when zoomed Enhanced - design time min and max size setting allowed // Freeware - you get it for free, I take nothing, I make no promises! // Please feel free to contact me: grahame.s.marsh@courtaulds.com

Classes

TMaximizedInfo -
TMinMax -
TMinMaxTrackSize -

Functions

Types

TBeforeResizeEvent
TMinMaxChange
TMinMaxChanges

Constants

Variables


Functions


Types


TBeforeResizeEvent = procedure (Sender : TObject; var MinMaxInfo : TMinMaxInfo) of object
This event is called after this component has altered the MinMaxInfo but before the window is resized.
TMinMaxChange = (mmMaximizedWidth, mmMaximizedHeight, mmMaximizedLeft, mmMaximizedTop,
                   mmMinTrackWidth,  mmMinTrackHeight,  mmMaxTrackWidth, mmMaxTrackHeight);
enables selection of which of the eight possible values in the MinMaxInfo should be be modified.
TMinMaxChanges = set of TMinMaxChange

Constants


Variables