Monitor function error

Monitor function error

Postby Silvio.Falconi » Wed Jan 10, 2024 8:11 am

I made easy

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


Image


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: Select all  Expand view  RUN
?   GetSysMetrics(0),GetSysMetrics(1)


is right
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7070
Joined: Thu Oct 18, 2012 7:17 pm

Re: Monitor function error

Postby Otto » Wed Jan 10, 2024 9: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6338
Joined: Fri Oct 07, 2005 7:07 pm

Re: Monitor function error

Postby nageswaragunupudi » 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
User avatar
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 49 guests