How I can get screen resolutions? lazarus / 39-Graphics ---------------------------------------------------------------------- lublinkermi · 2010-01-26 09:24 Hi, I need help to find any procedure to find resolution screen ? I need coordinate X  and Y for creating applications works fine in any resolutions... In PHP is very, very simple... Please help me! ---------------------------------------------------------------------- theo · 2010-01-26 09:30 Screen.Height Screen.Width Screen.PixelsPerInch ---------------------------------------------------------------------- lublinkermi · 2010-01-27 07:37 Thank You! ---------------------------------------------------------------------- Zaher · 2010-01-27 12:15 >In PHP is very, very simple PHP generate HTML, sp you must say HTML and CSS. Layouts in HTML and CSS more flexible than GUI app like Delphi and Lazarus. ---------------------------------------------------------------------- vonskie · 2019-12-05 02:39 var   dm: tDEVMODE; begin     FillChar(dm,SizeOf(dm) ,#0 );   dm.dmSize := sizeof(dm);   EnumDisplaySettings(nil, ENUM_CURRENT_SETTINGS, @dm);   showmessage(inttostr(dm.dmPelsHeight));   showmessage(inttostr(dm.dmPelsWidth));   end;    This is true resolution font scaling will not mess it up ---------------------------------------------------------------------- PascalDragon · 2019-12-05 09:05 Quote from: vonskie on December 05, 2019, 03:39:01 amvar   dm: tDEVMODE; begin     FillChar(dm,SizeOf(dm) ,#0 );   dm.dmSize := sizeof(dm);   EnumDisplaySettings(nil, ENUM_CURRENT_SETTINGS, @dm);   showmessage(inttostr(dm.dmPelsHeight));   showmessage(inttostr(dm.dmPelsWidth));   end;    This is true resolution font scaling will not mess it up This will only work on Windows however. ---------------------------------------------------------------------- wp · 2019-12-05 09:44 Quote from: lublinkermi on January 26, 2010, 10:24:19 amHi, I need help to find any procedure to find resolution screen ? I need coordinate X  and Y for creating applications works fine in any resolutions... Check the box "Use LCL scaling (High-DPI)" in "Project" > "Project Options". On Windows also select an appropriate "On" setting in the "DPI awareness" combobox. Make sure that "Use manifest resource" is checked. Then your program will be scaled automatically. ---------------------------------------------------------------------- vonskie · 2019-12-12 02:24 I used the below code for a while and ran into problems as sometimes it could not get the resolution I then changed ENUM_CURRENT_SETTINGS to ENUM_REGISTRY_SETTINGS and it works every time in windows. Quote from: vonskie on December 05, 2019, 03:39:01 amvar   dm: tDEVMODE; begin     FillChar(dm,SizeOf(dm) ,#0 );   dm.dmSize := sizeof(dm);   EnumDisplaySettings(nil, ENUM_CURRENT_SETTINGS, @dm);   showmessage(inttostr(dm.dmPelsHeight));   showmessage(inttostr(dm.dmPelsWidth));   end;    This is true resolution font scaling will not mess it up