Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Position the Wait window
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00728125
Message ID:
00728540
Views:
9
Pedro thanks for that. Unfortunately it doesn't take into account if the application screen has been changed in size or moved.

I think I've managed to solve it though - well near enough which will just have to be good enough.

Thanks for the input.

>Hi
>
>Use Function Shout
>
>
>
>** ex :
>** Shout("HI|second line| ... |... ",5)
>
>*------------------------------------------------------------------*
> Function Shout
>
>* Returns.......: nothing
>* Author........: MARTIN
>* Date..........: December '95
>* Version.......: 1.0
>* Parameters....: pcText = text to display
>*               : pnTimeOut = wait time (in seconds) before clearing
>*               :             the window (default = no wait)
>*)Notes.........: Shows a message on the screen
>*)              : Pipes (|) can be passed within pcText to indicate CARRY RETURNS
>*
>lparameters pcText, pnTimeOut
>
>local lnYY, lnXX
>
>* Replace every pipe with a Carry Return
>pcText = ChrTran( pcText, "|", chr(13) )
>
>* Calculates the total number of lines
>lnXX = 1
>for lnYY = 1 to memLines( pcText )
>	lnXX = max( lnXX, len( alltrim( mline(pcText, lnXX) ) ) )
>next
>
>* Calculates the center position on the screen
>lnYY = ( sRows()/ 2 ) - ( lnYY / 2 )
>lnXX = ( sCols() / 2 ) - ( lnXX / 2 )
>
>* Clears the keyboard buffer and any previous wait window
>clear typeahead
>wait clear
>
>* If a timeout was specified, it uses it
>if vartype( pnTimeOut ) = "N"
>	
> 	wait window pcText timeout pnTimeOut at lnYY, lnXX-5
>else
>	wait window pcText nowait at lnYY, lnXX-5
>endif
>
>return
>*--------------------------*
>
>
Caroline
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform