Utilizando MSGRUN,
Resolvi um problema que estava acontecendo comigo adicionando setdialogesc(.f.)
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function WaitSeconds( nSecs )
local nStart := GetTickCount()
DEFAULT nSecs := 1
while GetTickCount() - nStart < ( 1000 * nSecs )
end
return nil
//----------------------------------------------------------------------------//
function MsgRun( cCaption, cTitle, bAction )
LOCAL oDlg, nWidth
DEFAULT cCaption := "Please, wait...",;
bAction := { || WaitSeconds( 1 ) }
IF cTitle == NIL
DEFINE DIALOG oDlg ;
FROM 0,0 TO 3, Len( cCaption ) + 4 ;
STYLE nOr( DS_MODALFRAME, WS_POPUP )
ELSE
DEFINE DIALOG oDlg ;
FROM 0,0 TO 4, Max( Len( cCaption ), Len( cTitle ) ) + 4 ;
TITLE cTitle ;
STYLE DS_MODALFRAME
ENDIF
oDlg:bStart := { || Eval( bAction, oDlg ), oDlg:End(), SysRefresh() }
oDlg:cMsg := cCaption
nWidth := oDlg:nRight - oDlg:nLeft
setdialogesc(.f.) //AQUI Possivel FIX
ACTIVATE DIALOG oDlg CENTER ;
ON PAINT oDlg:Say( 11, 0, xPadC( oDlg:cMsg, nWidth ),,,, .T. )
return nil
//----------------------------------------------------------------------------//
function MsgWait( cCaption, cTitle, nSeconds )
DEFAULT nSeconds := 4
return MsgRun( cCaption, cTitle, { || WaitSeconds( nSeconds ) } )
//----------------------------------------------------------------------------//
Function StopUntil( bBlock )
DO WHILE !Eval( bBlock )
WaitMessage()
SysRefresh()
ENDDO
Return NIL