Jump to content
Fivewin Brasil

Leaderboard

Popular Content

Showing content with the highest reputation on 07/06/2020 in all areas

  1. Boas práticas de hj é sobre pesquisa INCREMENTAL em TBrowse com uso BackGound - Rotina em segundo plano. Tenho interesse por processamento paralelo e BackGround, o primeiro não consegui ainda, sei que tem parâmetros para incluir na compilação, mas não deu certo, o segundo consegui, no caso a rotina abaixo está rodando tbrowse() em uma tabela 'temp' indexada por nome, ao precionar F3 abre get para digitar e o conteúdo GET vai "Refresh() ando" no Browse. Se curtiu tecle "Joinha" oTB:ForceStable() nKEY := Inkey(0) IF nKEY == K_ESC EXIT ELSEIF nKEY == K_F3 /*processamento em segundo plano*/ HB_IdleAdd( {|| HB_BackGroundRun() } ) nTask := HB_BackGroundAdd( {|| RefreshTB(oTB) }, 1000 ) SET BACKGROUND TASKS ON /*------------------------------*/ cChave := Space(35) //BOX3DOF(14,16,18,58) @ 14,16 clear to 18,58 DispBox(14,16,18,58,2,"n/b") @ 16,20 GET cChave PICT "@!" READ HB_BackGroundDel( nTask ) oTB:RefreshAll() Endif **---------------------------------------------------------------------- Function RefreshTB(oTB) //fica rodando BackGround **---------------------------------------------------------------------- Local cTela,oGet:=GetActive() Static cLast := '' If HB_IsObject(oGet) .and. cLast != oGet:buffer cTela := SaveScreen(14,16,18,58) TEMP->(DBSEEK(oGet:buffer,.T.)) oTB:RefreshAll() oTB:ForceStable() Restscreen(14,16,18,58,cTela) cLast := oGet:buffer oGet:SetFocus() Endif Return .t. xHarbour/Harbour, FiveWin, SqlRdd e Pelles C - Editor xEdit
    1 point
×
×
  • Create New...