I ask why I have a problem when the code block is waiting too long to respond and the user clicks on the window. In this case, the application appears to be locked and the user drops the application.
Example:
- Code: Select all Expand view
MsgRun("Attention: The System has not locked! This routine will take a long time because of the size of your database. Wait until completion.",,{ | oDlg | ;
lOkZip := hb_ZipFile( cFolderTargetZip ,; // ZipFile (nome do zip)
acFiles ,; // File to Compress, pode ser array
HBL_ZIPLEVEL ,; // Nivel de compressão
bOnZipFile ,; // Codeblock a executar enquanto comprime
XBL_ZIPOVERWRITE ,; // Overwrite
"1234" ,; // Password
XBL_ZIPWITHPATH ,; // Armazena caminho (PATH)
NIL ) }) // Codeblock para file progress
// FiveWin CodeBlock Class
- Code: Select all Expand view
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
CLASS TBlock
DATA cExpression
DATA bBlock
METHOD New( cExpression ) CONSTRUCTOR
METHOD Eval( uPar1, uPar2, uPar3, uPar4, uPar5 ) INLINE ;
If( ::bBlock != nil,;
Eval( ::bBlock, uPar1, uPar2, uPar3, uPar4, uPar5 ),)
METHOD Exec( uPar1, uPar2, uPar3, uPar4, uPar5 ) INLINE ;
If( ::bBlock != nil,;
Eval( ::bBlock, uPar1, uPar2, uPar3, uPar4, uPar5 ),)
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( cExpression ) CLASS TBlock
if Type( cExpression ) $ "UEUI"
MsgAlert( "Invalid expression at Block constructor" )
else
::cExpression = cExpression
::bBlock = &( cExpression )
endif
return nil
//----------------------------------------------------------------------------//