A função recebe lContinua .T., funciona.
Mas se eu quiser trocar o valor para lContinua := .F., a Thread continua com o valor da variável lContinua com .T.
Tem como intervir nos valores em uma thread?
no DO WHILE lContinua
PUBLIC lContinua := .T.
nThread := Hb_ThreadStart( HB_BITOR( HB_THREAD_INHERIT_PUBLIC, ;
HB_THREAD_INHERIT_PRIVATE, ;
HB_THREAD_INHERIT_MEMVARS, ;
HB_THREAD_MEMVARS_COPY ), ;
{ || Teste() } )
lContInua := .F.
FUNCTION Teste()
LOCAL nRow AS NUMERIC, nCol AS NUMERIC
nCol := Col()
nRow := Row()
nSeconds := Seconds()
DO WHILE lContinua
Hb_IdleSleep( 1 )
IF (Seconds() - nSeconds) > 5
nSeconds := Seconds()
cTime := Time()
IF File( "TIME.TXT" )
cTime := Hb_MemoRead( "TIME.TXT" ) + Hb_Eol() + cTime
ENDIF
Hb_MemoWrit( "TIME.TXT" , cTime )
ENDIF
hwg_DoEvents()
ENDDO
WAPI_BRINGWINDOWTOTOP( Hb_gtInfo( HB_GTI_WINHANDLE ) )
Quit
RETURN Nil