TMDisplayChangeFreeware without source!
If your application has to work on different screen resolutions, then it would be nice if it could resize itself and looks like you made it for appropriate resolution. This problem is not resolved as it should (to my knowledge) and the form becomes too large to fit on the screen or too small and unreadable, sometimes unusable at all.
One possible global solution to the problem could be implementing the OnDisplayChange event to the TControl class itself, but one can find a lot of drawbacks to this approach!
Another possible global solution is what this component actually does! It hooks into owners form message handler, captures WM_DISPLAYCHANGE message and fires appropriate events for the form and each control on it. You can abandon or accept default changes and resize control yourself, if you like.
TMDisplayChange will resize your form and all components on it, having in mind it's design time size in millimeters (approximately), instead in pixels.
Since this is not an easy task to perform, if possible at all in general, (otherwise it would be probably solved by Borland Delphi or MS Windows), I tried to do it myself and I believe I am close to the solution! It works for me, you can try and use it for free!will remember the form, screen and font sizes in pixels and will fire several events if the screen resolution is changed while the form is active or in the case your application is started on PC with different screen resolution then the design time one. TMDisplayChange traps WM_DISPLAYCHANGE message sent to all active windows, recalculates new coordinates and fires appropriate events as form and each component on it is resized!
property DesignTime: TSysParams;
This published, read only property encapsulates the structure with all relevant design time coordinates and sizes. While in run time mode, there is another one (publicproperty RunTime: TSysParams;) with the same structure. Look in OI for details and you will get the point!
property TraceLogMemo: TMemo;
This is "DebugOnly"
property! While developing your application, you can assign some TMemo
component and see the recalculated sizes and take appropriate actions or
changes in your code. This should be set to nil in deployed application!
on purchase Price: US $ 30.
Back to top
Copyright © 2001 Database4YoU Last modified: April 15, 2001