FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Monitor function error
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Monitor function error
Posted: Wed Jan 10, 2024 08:11 AM
I made easy

?ScreenHeight(),ScreenWidth() and give me 961, 1280 the screen resolution is actually different as you can see on picture





How it's possible ?
this is why one then makes a mistake in creating the dialogs in the right position

i.e. the resolution of ScreenWidth() is right the resolution of ScreenHeight() is bad compared to the screen resolution,there is a difference of 63

this
Code (fw): Select all Collapse
 ?   GetSysMetrics(0),GetSysMetrics(1)
is right
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: Monitor function error
Posted: Wed Jan 10, 2024 09:32 AM

Silvio,

Fivewin uses the GetSysMetrics API with the SM_CXFULLSCREEN and SM_CYFULLSCREEN flags, as seen in C:\FWH\source\function\getsysin.prg.

These constants are designed to return the width and height of the client area for the primary display monitor, excluding the taskbar and other docked bars from the work area of the screen.

What are your values if you move the taskbar to the left or right?

Best regards,

Otto

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Monitor function error
Posted: Wed Jan 10, 2024 11:57 AM
i.e. the resolution of ScreenWidth() is right the resolution of ScreenHeight() is bad compared to the screen resolution,there is a difference of 63
ScreenHeight() excludes the taskbar height, and gives the height available for our program's window/display.
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion