comp.lang.ada
 help / color / mirror / Atom feed
* How to get the screen size?
@ 2013-04-06 17:35 tolkamp
  2013-04-06 17:56 ` tmoran
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: tolkamp @ 2013-04-06 17:35 UTC (permalink / raw)


To make my ada application program suitable for more monitor sizes, I need the Screen Size. Where the size is the number of pixels.
Is there a function or procedure to get the screen width and height?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to get the screen size?
  2013-04-06 17:35 How to get the screen size? tolkamp
@ 2013-04-06 17:56 ` tmoran
  2013-04-06 18:04 ` Patrick
  2013-04-07  9:38 ` tolkamp
  2 siblings, 0 replies; 5+ messages in thread
From: tmoran @ 2013-04-06 17:56 UTC (permalink / raw)


>To make my ada application program suitable for more monitor sizes, I need
>the Screen Size.  Where the size is the number of pixels.  Is there a
>function or procedure to get the screen width and height?

On which monitor, under which OS?
CLAW (Class Library for Ada on Windows) has Get_System_Metrics, which
basically calls Windows' GetSystemMetrics with the right parameter.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to get the screen size?
  2013-04-06 17:35 How to get the screen size? tolkamp
  2013-04-06 17:56 ` tmoran
@ 2013-04-06 18:04 ` Patrick
  2013-04-07  9:38 ` tolkamp
  2 siblings, 0 replies; 5+ messages in thread
From: Patrick @ 2013-04-06 18:04 UTC (permalink / raw)


On Saturday, April 6, 2013 1:35:54 PM UTC-4, tolkamp wrote:
> To make my ada application program suitable for more monitor sizes, I need the Screen Size. Where the size is the number of pixels.
> 
> Is there a function or procedure to get the screen width and height?

There are multiple ways to do this. Are you in a browser, under Ncurses or inside a GUI? You can also get this directly from X assuming your not on Windows

-Patrick


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to get the screen size?
  2013-04-06 17:35 How to get the screen size? tolkamp
  2013-04-06 17:56 ` tmoran
  2013-04-06 18:04 ` Patrick
@ 2013-04-07  9:38 ` tolkamp
  2013-04-07 10:00   ` Dmitry A. Kazakov
  2 siblings, 1 reply; 5+ messages in thread
From: tolkamp @ 2013-04-07  9:38 UTC (permalink / raw)


Op zaterdag 6 april 2013 19:35:54 UTC+2 schreef tolkamp het volgende:
> To make my ada application program suitable for more monitor sizes, I need the Screen Size. Where the size is the number of pixels.
> 
> Is there a function or procedure to get the screen width and height?

My ADA application program uses JEWL packages.
The OS is Windows 7.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: How to get the screen size?
  2013-04-07  9:38 ` tolkamp
@ 2013-04-07 10:00   ` Dmitry A. Kazakov
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry A. Kazakov @ 2013-04-07 10:00 UTC (permalink / raw)


On Sun, 7 Apr 2013 02:38:13 -0700 (PDT), tolkamp wrote:

> Op zaterdag 6 april 2013 19:35:54 UTC+2 schreef tolkamp het volgende:
>> To make my ada application program suitable for more monitor sizes, I need
>> the Screen Size. Where the size is the number of pixels.
>> 
>> Is there a function or procedure to get the screen width and height?
> 
> My ADA application program uses JEWL packages.
> The OS is Windows 7.

Does JEWL provide this information?

Anyway, if your application is limited to Windows already, there is no
reason not to use Win32Ada.

You call GetDesktopWindow from the package Win32.Winuser, which gives you a
handle to the desktop window. Then you call GetWindowRect on that window.
The rectangle returned is one of the desktop. For further information see
MSDN:

http://msdn.microsoft.com/en-us/library/windows/desktop/ms633504%28v=vs.85%29.aspx

Note than Windows supports multiple monitors. You could wish to enumerate
them. See GetMonitorInfo in MSDN.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-04-07 10:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-06 17:35 How to get the screen size? tolkamp
2013-04-06 17:56 ` tmoran
2013-04-06 18:04 ` Patrick
2013-04-07  9:38 ` tolkamp
2013-04-07 10:00   ` Dmitry A. Kazakov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox