Screen size lazarus / 39-Graphics ---------------------------------------------------------------------- Borneq · 2020-01-21 21:07 How to read screen resoution , for example 1920x1080? How to detect second monitor? Is possible detect physical monitor size? Probably it is possible, bacause ubuntu program Xreader (called fom textWorks) show me pdf at 100% exactly equal printed page. ---------------------------------------------------------------------- syntonica · 2020-01-21 21:29 It's not pretty. You have to be able to query the monitor hardware since every monitor has a different physical DPI. Start here: https://wiki.lazarus.freepascal.org/High_DPI You should be able to use one of those hooks to get the ratios you need. ---------------------------------------------------------------------- Ñuño_Martínez · 2020-01-21 21:49 Use the Screen object. ---------------------------------------------------------------------- howardpc · 2020-01-21 22:01 Every Lazarus form has a Monitor property which has Height, Width and PixelsPerInch properties. ---------------------------------------------------------------------- Ñuño_Martínez · 2020-01-22 10:49 Quote from: howardpc on January 21, 2020, 11:01:34 pmEvery Lazarus form has a Monitor property which has Height, Width and PixelsPerInch properties. Yes, TForm.Monitor references the monitor where the form is created (not sure if it changes if you drag the window to another monitor). The Screen object has a list with all available monitors. ---------------------------------------------------------------------- BeniBela · 2020-01-22 10:55 I use this to get the usable screen size: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i var workarea: TRect;  mon: TMonitor;begin  //see MoveToDefaultPosition  workarea := default(TRect);  if Application.MainForm <> nil then mon := Application.MainForm.Monitor  else mon := Monitor;  if mon <> nil then workarea := mon.WorkareaRect;  if (workarea.Width <= 0) or (workarea.Height <= 0) then workarea := screen.WorkAreaRect;  if (workarea.Width <= 0) or (workarea.Height <= 0) then workarea := screen.DesktopRect;  if ((workarea.Width <= 0) or (workarea.Height <= 0)) and (mon <> nil) then workarea := mon.BoundsRect;  if (workarea.Width <= 0) or (workarea.Height <= 0) then begin    workarea.Width := screen.Width;    workarea.Height := screen.Height;  end;