Page 1 of 1
How to get screen size and resolution
Posted: Thu May 30, 2013 5:23 pm
by daryl
Hi Folks,
I am trying to figure out if there is any way to determine the screen size and resolution. I have been looking through the documentation but have not been able to find any details on this. I have had a look at the platform, environment, processor, machine and systemVersion functions, and am wondering if there might be others I've missed that might be useful for determining the screen size. I want to write an application that will scale from smartphones to the desktop.
Any help would be greatly appreciated.
Thanks,
Daryl
Re: How to get screen size and resolution
Posted: Thu May 30, 2013 5:27 pm
by mwieder
Try the screenrect.
Re: How to get screen size and resolution
Posted: Thu May 30, 2013 5:45 pm
by daryl
Hi MWieder, that is just what I was looking for.
Regards,
Daryl
Re: How to get screen size and resolution
Posted: Wed Apr 08, 2026 8:06 am
by richmond62
That only gives you the resolution: it does NOT give you the physical screen size.
Re: How to get screen size and resolution
Posted: Wed Apr 08, 2026 12:29 pm
by Klaus
Come on, Richmond, 13 years later?

Re: How to get screen size and resolution
Posted: Wed Apr 08, 2026 1:56 pm
by dunbarx
Richmond.
13 years or not, I think the OP actually wanted what Mark suggested. After all, the physical dimensions of one's screen can only be found with a ruler, or by reading the manual that comes with the device, and that likely does not mean anything.
Craig
Re: How to get screen size and resolution
Posted: Wed Apr 08, 2026 5:13 pm
by richmond62
I have a 27 inch iMac that I can 'dial down' to an 800 * 600 screen resolution, and I can do the same with my cathode ray tube G3 iMac . . .
So, while LC can tell me that my screenRect is 800 * 600 on both of those machines, it cannot tell me that that looks reasonable on the G3 and like a bloated haggis on the 27 inch monster.
Of course if LC could determine the maximum screen resolution of a particular display that would be jolly useful.
Re: How to get screen size and resolution
Posted: Wed Apr 08, 2026 9:58 pm
by dunbarx
Richmond.
But it was never actually screen "size" that was in play. It was resolution, and I suppose if you were porting to an 85" TV at 800x600 each pixel would be about the size of a pignoli. No problem, just view the screen from 20 meters.
Craig
Re: How to get screen size and resolution
Posted: Thu Apr 09, 2026 8:33 am
by richmond62
Let's throw in Windows pixel scaling just to stir the discussion up a bit more.