Hi,
Is it possible to calculate the size of the window in millimeters ?
Size of the window
- James Bott
- Posts: 4840
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Size of the window
I found this in my notes:
I have never used it.
You will still have to convert from pixels to whatever unit you wish.
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)
I have never used it.
You will still have to convert from pixels to whatever unit you wish.
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: Size of the window
FWH has these functions since November 2015:
Please see WhatsNew.txt November 2015.
You may find more interesting function for touch screens
Also see fwh\source\function\getsysin.prg for these and multiple monitor functions, etc
Code: Select all | Expand
ScreenWidthMM()
ScreenHeightMM()
ScreenSize() --> Diagonal size in MM
ScreenSize( .t. ) --> Diagonal size in INCHES
Please see WhatsNew.txt November 2015.
You may find more interesting function for touch screens
Also see fwh\source\function\getsysin.prg for these and multiple monitor functions, etc
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India