Size of the window
Posted: Wed Oct 06, 2021 10:42 am
Hi,
Is it possible to calculate the size of the window in millimeters ?
Is it possible to calculate the size of the window in millimeters ?
www.FiveTechSoft.com
https://forums.fivetechsupport.com/~fivetec1/forums/
https://forums.fivetechsupport.com/~fivetec1/forums/viewtopic.php?t=40901
Note that this method updates the instance vars containing the coordinates of the client area of the window, nTop,nBottom,nWidth, and nHeight. These are NOT the coordinates of the window itself.
To get the coordinates of the window you will have to add the width or height of any objects attached to the window client oClient.
oWnd:coorsUpdate()
nTop:= oWnd:nTop
nTop:= nTop + if(oWnd:oTop!=nil,oWnd:oTop:nHeight,0)
// Note that oMenu doesn't have an attribute nHeight. It is fixed at 20 pixels.
nTop:= nTop + if(oWnd:oMenu!=nil,20,0)
Code: Select all | Expand
ScreenWidthMM()
ScreenHeightMM()
ScreenSize() --> Diagonal size in MM
ScreenSize( .t. ) --> Diagonal size in INCHES