From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!mx05.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: How to get the screen size? Date: Sun, 7 Apr 2013 12:00:24 +0200 Organization: cbb software GmbH Message-ID: References: <6b8c123d-e1fd-40a9-bc88-891241727409@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: rHWOzyHApalsT5sEUcbvVQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:14907 Date: 2013-04-07T12:00:24+02:00 List-Id: 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