>*** This method displays a Wait Window containing txMessage, just above toObject. >*** Include .T. for tlClear or tlWait if you want clear the message or wait for a key press. >*** Examples from text box Valid methods: >*** THISFORM.WaitWindow("Note: Division has also been reset. Tap any key to continue.", THIS, .T., .T.) >*** THISFORM.WaitWindow("Please enter an Estimate greater than or equal to zero.", THIS) > >LPARAMETERS tcMessage, toObject, tlClear, tlWait > >IF ! tlClear > tcClear = "NOCLEAR" >ELSE > tcClear = "" >ENDIF >IF ! tlWait > tcWait = "NOWAIT" >ELSE > tcWait = "" >ENDIF > >TitleHeight = SYSMETRIC(9) >FrameHeight = SYSMETRIC(11) >MenuHeight = SYSMETRIC(20) >ScreenRows = SROWS() >PixelsPerRow = _screen.Height / ScreenRows > >*** All objects on this form are enclosed in 2 page frames, that is the reason for the parent.parent >*** This needs to be changed to automatically search the object for parent containers >RowStartPixel = _Screen.Top + ThisForm.Top + toObject.Top + toObject.parent.parent.Top + ; > toObject.parent.parent.parent.parent.Top + 2 * FrameHeight + MenuHeight + 3 * TitleHeight >lnRow = RowStartPixel / PixelsPerRow > >FrameWidth = SYSMETRIC(10) >ScreenCols = SCOLS() >PixelsPerColumn = _screen.Width / ScreenCols >ScreenWidth = SYSMETRIC(1) >MessageWidth = ThisForm.TextWidth(tcMessage) >ColumnStartPixel = _Screen.Left + ThisForm.Left + toObject.Left + toObject.parent.parent.Left ; > + toObject.parent.parent.parent.parent.Left + 2 * FrameWidth >IF MessageWidth + ColumnStartPixel > ScreenWidth > ColumnStartPixel = ColumnStartPixel - MessageWidth + toObject.Width >ENDIF >lnCol = ColumnStartPixel / PixelsPerColumn > >*** Adding 1 to the row and column makes it display in the right location???? >WAIT tcMessage WINDOW AT lnRow + 1, lnCol + 1 &tcWait &tcClear >