Señores, como hago esto en xHARBOUR y FiveWin?
Gracias, saludos.
/*
StartThread() // Start a progress bar windows
aFiles := DirectoryRecurse(PathPictArt + "*.jpg")
StopThread() // Stop and close this windows
*/
PROCEDURE Main
LOCAL oThread := Thread():new() // create thread object
CLS
oThread:start( "Sum", 10000 ) // sum numbers from 1
// to 10000
DO WHILE .T. // display characters during
?? "." // the calculation
Sleep(10)
IF ! oThread:active // Check if thread still runs
EXIT
ENDIF
ENDDO
? "The sum is:", oThread:result
RETURN
FUNCTION Sum( nNumber )
LOCAL i, nSum := 0
FOR i:=1 TO nNumber
nSum += i
IF i % 100 == 0 // progress display
DispOutAt( MaxRow(), 0, i )
ENDIF
NEXT
RETURN nSumGracias, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341