Unit Aspect |
======================== FORM ASPECT RATIO CONTROL =========================== // Component to control the aspect ratio of either a form or a form's client area. This component came about because I was loading bitmaps into a TImage on a form with the TImage set to alClient and Stretch to true. This meant the bitmap was displayed at the scale that the form was sized to, but meant that the image became distorted if the aspect ratio of the original bitmap was not maintained - not an easy thing to do manually. // The component works by adding a new WndProc and intecepting the (win 32) WM_SIZING message. This messgae is send repeatedly while a window is being resize by dragging a corner or side. The component calculates the "other" side from the one being dragged forcing a given aspect ratio to be maintained. The component also intercepts the WM_GETMINMAXINFO message to ensure that the aspect ratio is maintained when the form is zoomed to full size. // NB This component will "fight" with to TMinMax component. The second of this and TMinMax placed on a form will win. // Version 1.10 Grahame Marsh 19 January 1997 // Freeware - you get it for free, I take nothing, I make no promises! // Please feel free to contact me: grahame.s.marsh@corp.courtaulds.co.uk
Classes |
TAspect -
Functions |
Register - I like it on the System Page, you might like to put it on Win95 since it's a win 32 only component
Types |
TBeforeResizingEvent
TModClientEvent
Constants |
Variables |
Functions |
Types |
TBeforeResizingEvent = procedure (Sender : TObject; var R : TRect) of object
TModClientEvent = procedure (Sender : TObject; var X, Y : integer) of object
Constants |
Variables |