Someone asked a question "how do I go from pixels to Rows and Columns?"
I wanted to display the output from a wait message near to the label the user has just clicked. Here is my solution -
If anyone is still crazzy enough to be programming in Fox - I hope this helps
---------------------------------------------------------------------------------------------------
LOCAL lcTargetForm
nChrHeight = FONTMETRIC(1) && Chr height
nChrWidth = FONTMETRIC(6) && average Chr width
nRow = INT(this.top / nChrHeight) + 1
ncol = INT(this.Left / nChrWidth) + 1
IF EMPTY(THIS.targetform )
WAIT WINDOW 'Not available ' AT nRow,nCol && almost AT ROW(),COL()
RETURN
ELSE
lcTargetForm = THIS.targetform
DO FORM (lcTargetForm)
ENDIF
--------------------------------------------------------------------------------------------------
I wanted to display the output from a wait message near to the label the user has just clicked. Here is my solution -
If anyone is still crazzy enough to be programming in Fox - I hope this helps
---------------------------------------------------------------------------------------------------
LOCAL lcTargetForm
nChrHeight = FONTMETRIC(1) && Chr height
nChrWidth = FONTMETRIC(6) && average Chr width
nRow = INT(this.top / nChrHeight) + 1
ncol = INT(this.Left / nChrWidth) + 1
IF EMPTY(THIS.targetform )
WAIT WINDOW 'Not available ' AT nRow,nCol && almost AT ROW(),COL()
RETURN
ELSE
lcTargetForm = THIS.targetform
DO FORM (lcTargetForm)
ENDIF
--------------------------------------------------------------------------------------------------