read more »
With advance of modern monitors, their screen pixel resolutions are growing larger and larger. Back in 2003, typical development requirement was to support 800×600 resolution, nowadays it is 1024×768.
Actually, according to my webserver logs, screen resolution of 1280×1024 is set on 50% of all monitors. This percentage could bigger, but users complain fonts are getting too small to be read, and decrease their screen resolutions to 1024×768. Meanwhile their monitors support larger resolutions…
Most advanced users increase DPI setting in Display properties, and start to experience problems, because most applications do not support non-default DPI settings.
For example, in my case, my typical screen configuration, which I recommend, looks as follows:
90% of Delphi applications I have seen, do not support Large Fonts, or support it very ugly. This is due to the fact, that VCL implementation of custom DPI is very ugly. There is a Scaled property in TForm, which was about to handle form scaling in case of non-default DPI setting, but it is not working correctly.
So here is my minimal code to support custom DPI/Large Fonts in Delphi applications correctly:
procedure TgxCustomForm.FormCreate(Sender: TObject); begin Assert(not Scaled, 'You should set Scaled property of Form to False!'); case Screen.PixelsPerInch of 96: begin // default resolution at which application is developed ///ScaleBy(96, 96); end; 120: begin ScaleBy(120, 96); end; else begin ScaleBy(Screen.PixelsPerInch, 96); end; end; end;
»
Comments for this post
New Code
New variant of above code:
Andriy, your last version
Display Statistics
OneStat.com (www.onestat.com) today reported that the screen resolution 800 x 600 pixels has signficantly decreased since July 2005. More and more internet users choose for screen resolution 1024 x 768 or higher.
http://www.onestat.com/html/aboutus_pressbox43-screen-resolutions.html
Post new comment