Hello,
How can I read the sizes of my screen ?
MaxCol() and MaxRow() don't work properly, respectivally returning 79 x 23, knowing I use a screen 1280 x 1024.
Thanks.
Sizes of the screen
Sizes of the screen
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Sizes of the screen
Michel
OWND:nHorzRes()
OWND:nVertRes()
OWND:nHorzRes()
OWND:nVertRes()
Richard,
Thanks a lot for you answer.
I'm afraid though that this doesn't solve my problem.
I use this code to position a Word-window from my FWH-application :
This way, I always can see my FWH-bar and everything from Word.
I need to use 768 as a value for maximum width and 553 for the height (it is the maximum height - 2 cm) to present my Word-window the way I want to.
I can't see the link between 1280 (returned by oWnd:nHorzRes()) and the value 768 I have to use.
Any idea ?
Thanks.
Thanks a lot for you answer.
I'm afraid though that this doesn't solve my problem.
I use this code to position a Word-window from my FWH-application :
Code: Select all
OleSetProperty(hWordOle,"Top",43)
OleSetProperty(hWordOle,"Left",0)
OleSetProperty(hWordOle,"Width",768)
OleSetProperty(hWordOle,"Height",553)
I need to use 768 as a value for maximum width and 553 for the height (it is the maximum height - 2 cm) to present my Word-window the way I want to.
I can't see the link between 1280 (returned by oWnd:nHorzRes()) and the value 768 I have to use.
Any idea ?
Thanks.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
- Rick Lipkin
- Posts: 2397
- Joined: Fri Oct 07, 2005 1:50 pm
- Location: Columbia, South Carolina USA
Hello Rick,
Thanks for your reaction.
Unfortunately I don't see any difference between GetSysMetrics() and oWnd:nHorzRes() or oWnd:nVertRes(). The results are the same.
Problem is that Word needs other value to set a maximum width. I tested it by using the example I sent before. The Value 768 results in a Word window with a maximum width.
Thanks anyway.
Thanks for your reaction.
Unfortunately I don't see any difference between GetSysMetrics() and oWnd:nHorzRes() or oWnd:nVertRes(). The results are the same.
Problem is that Word needs other value to set a maximum width. I tested it by using the example I sent before. The Value 768 results in a Word window with a maximum width.
Thanks anyway.
Regards,
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 21.01 - Harbour 3.2.0 (October 2020) - xHarbour Builder (January 2020) - Bcc7
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Michel,
>I can't see the link between 1280 (returned by oWnd:nHorzRes()) and the value 768 I have to use.
I assume you want to know how to do the same thing for different screen resolutions? It seems that Word is not using pixels, so perhaps you can just use the ratios:
nWidth := GetSysMetrics(0) * ( 768 / 1280 )
nHeight := GetSysMetrics(1) * ( 553 / 1024 )
James
>I can't see the link between 1280 (returned by oWnd:nHorzRes()) and the value 768 I have to use.
I assume you want to know how to do the same thing for different screen resolutions? It seems that Word is not using pixels, so perhaps you can just use the ratios:
nWidth := GetSysMetrics(0) * ( 768 / 1280 )
nHeight := GetSysMetrics(1) * ( 553 / 1024 )
James