[Lazarus] Obtaining screen geometry

Paul Ishenin webpirat at mail.ru
Tue Jun 29 01:00:30 CEST 2010


  23.06.2010 13:37, Brad Campbell wrote:
> Recently after he had unplugged the right hand screen, the app 
> proceeded to put itself there anyway (off the edge of the accessible 
> desktop). Is there an easy way to detect the current screen width, so 
> if I sense my geometry is going to be off the edge I can provide a 
> sane default instead?
Use Screen.Monitors[] to get the geomentry of every monitor in the 
system. You can use the WorkArea property to exclude system menu, 
dockbar and taskbar of various window managers.

Best regards,
Paul Ishenin.




More information about the Lazarus mailing list