Eu usei um exemplo, também da pasta SAMPLES (não me lembro o nome) e adaptei para mim !
*****************************************************************************************
Segue o utilitário (winespera.prg) abaixo:***************************************************************************************************
#include "minigui.ch"
//////////////////////////////////////////////////////////////////////////////
FUNCTION WaitWinCreate( cTitle, lCenter, nWRow, nWCol)
LOCAL cFormName := "WaitWin_" + HB_NtoS( _GetId() )
LOCAL nTime := SECONDS()
LOCAL aPict := {"FR01","FR02","FR03","FR04","FR05","FR06","FR07","FR08",;
"FR09","FR10","FR11","FR12"}
DEFAULT cTitle := "Aguarde...", lCenter := .T., nWRow := 0, nWCol := 0
nStaticLogo := 1 // assign a number to display picture
SET INTERACTIVECLOSE OFF
DEFINE WINDOW &cFormName ;
ROW 0 COL 0 ;
WIDTH 420 HEIGHT 230 ;
TITLE '' ;
MINWIDTH 420 MINHEIGHT 230 ;
MAXWIDTH 420 MAXHEIGHT 230 ;
CHILD NOCAPTION ;
TOPMOST ;
BACKCOLOR WHITE ;
FONT 'Tahoma' SIZE 12
@ 10, 10 LABEL Label_1 ;
WIDTH 400 HEIGHT 20 ;
VALUE "Tempo transcorrido " + TIME() ;
CENTERALIGN VCENTERALIGN TRANSPARENT
@ 40, (420-128)/2 IMAGE Image_1 PICTURE aPict[nStaticLogo] ;
WIDTH 128 HEIGHT 128 ;
TRANSPARENT
@ 178, 10 LABEL Label_2 ;
WIDTH 400 HEIGHT 20 ;
VALUE cTitle ;
CENTERALIGN VCENTERALIGN TRANSPARENT
END WINDOW
IF lCenter == .F.
SetProperty( cFormName, "Row", nWRow )
SetProperty( cFormName, "Col", nWCol )
ELSE
Center Window &cFormName
ENDIF
Activate Window &cFormName NoWait
RETURN { cFormName, aPict, nTime } // return the number of windows to then kill him by the window
//////////////////////////////////////////////////////////////////////
FUNCTION WaitWinTimer( aDim, cExtra )
LOCAL cFormName := aDim[1], aPict := aDim[2], cTime, nTime := aDim[3]
cTime := cExtra + " Tempo Transcorrido " + SECTOTIME( SECONDS() - nTime )
SetProperty( cFormName, "Label_1", "Value", cTime )
nStaticLogo ++ // the number of display picture
nStaticLogo := IIF( nStaticLogo > LEN(aPict), 1, nStaticLogo )
SetProperty( cFormName, "Image_1", "Picture", aPict[nStaticLogo] )
RETURN NIL
FUNCTION WaitWinCreate2( cTitle, lCenter, nWRow, nWCol)
LOCAL cFormName := "WaitWin_" + HB_NtoS( _GetId() )
LOCAL nTime := SECONDS()
LOCAL aPict := {"FR01","FR02","FR03","FR04","FR05","FR06","FR07","FR08",;
"FR09","FR10","FR11","FR12"}
DEFAULT cTitle := "Aguarde...", lCenter := .T., nWRow := 0, nWCol := 0
#define CLR2_LIGHTBLUE { 165, 175, 245 }
SET INTERACTIVECLOSE OFF
DEFINE WINDOW &cFormName ;
ROW 0 COL 0 ;
WIDTH 400 HEIGHT 64 ;
TITLE '' ;
MINWIDTH 400 MINHEIGHT 64 ;
MAXWIDTH 400 MAXHEIGHT 64 ;
CHILD NOCAPTION ;
TOPMOST ;
BACKCOLOR CLR2_LIGHTBLUE ;
FONT 'Tahoma' SIZE 12
/*
@ 10, 10 LABEL Label_1 ;
WIDTH 400 HEIGHT 20 ;
VALUE cTitle ;
CENTERALIGN VCENTERALIGN TRANSPARENT
*/
@ 16, 10 LABEL Label_1 VALUE cTitle WIDTH 380 HEIGHT 24 FONT 'Arial' SIZE 14 ;
FONTCOLOR BLUE BOLD BACKCOLOR CLR2_LIGHTBLUE CENTERALIGN
END WINDOW
IF lCenter == .F.
SetProperty( cFormName, "Row", nWRow )
SetProperty( cFormName, "Col", nWCol )
ELSE
Center Window &cFormName
ENDIF
Activate Window &cFormName NoWait
RETURN cFormName
//////////////////////////////////////////////////////////////////////
FUNCTION WaitWinClose( cFormName )
SET INTERACTIVECLOSE ON
Domethod( cFormName, "Release" )
DO MESSAGE LOOP
RETURN NIL
*************************************************************************************************
Exemplo de como usar o utilitario acima:***************************************************************************************************
Function exemplo()
Local sformwait := ""
sformwait := WaitWinCreate2( 'Aguarde...' ) // cria o form de espera, tem dois modos a escolher (WaitWinCreate e WinWaitCreate2)
executa_tarefa()
WaitWinClose( sformwait ) // encerra o form de espera
Return nil