I have something strange. Please concider this code:
Code: Select all
#include "FiveWin.ch"
FUNCTION Main()
LOCAL oDlg
DEFINE DIALOG oDlg TITLE "Test" FROM 0,0 TO 310,530 PIXEL
@ 1, 2 SAY oDlg:nHeight OF oDlg
@ 2, 2 SAY oDlg:nWidth OF oDlg
ACTIVATE DIALOG oDlg CENTERED ON PAINT TestXY(oDlg)
RETURN NIL
//-------------------------------
PROCEDURE TestXY(oDlg)
oDlg:SetText( Str(oDlg:nHeight,3,0) +","+ Str(oDlg:nWidth,3,0) )
RETURN
How can I make them the same?
I discovered this when my buttons on my dialog, which are painted based on the height of the dialog, was placed different on a Vista machine than on a WindowsXP machine.
The nHeight that is in "@ 1,2 SAY..." is the same on Vista or XP, but the nHeight of the "ON PAINT.." is different on Vista than on XP.
So, I have to find a way that the nHeight() of a Dialog is the same on Vista or XP.
Please try the sample, it makes it so much simpler to explain
Patrick