How to bind component sizes to screen resolution? lazarus / 43-Android ---------------------------------------------------------------------- shyub · 2021-03-12 12:17 The form contains jImageBtn, images for which are stored in jImageList. At different screen resolutions, the size of the pictures does not correspond to the size of the buttons. How can I determine the screen resolution so that I can connect the corresponding jImageList, or maybe there is some other way to make the image fit the size of the button? ---------------------------------------------------------------------- MarkMLl · 2021-03-12 12:41 I've just come back to this after spotting that you're specifically interested in Android... below is for a PC but might still be relevant. 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   RESULT:= RESULT + 'Screen ' + DisplayIdentifier + ', displaying ' +              IntToStr(Screen.Width) + 'x' + IntToStr(Screen.Height) +              ' at ' + IntToStr(Screen.PixelsPerInch) + ' dpi';  MarkMLl ---------------------------------------------------------------------- shyub · 2021-03-12 16:39 Thanks, but that's not it. In Windows, I can find out when the program starts (onCreate), but I don’t know where to find out in LAMW. ---------------------------------------------------------------------- shyub · 2021-03-12 16:43 The picture does not apply to this issue, I can not delete it. ---------------------------------------------------------------------- shyub · 2021-03-17 10:22 You can find out the screen resolution like this: 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 procedure TAndroidModule1.AndroidModule1JNIPrompt(Sender: TObject);begin  jTextV iew1.Text:=IntToStr(AndroidModule1.Width)+'x'+IntToStr(AndroidModule1. Height);end;