FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Backgroundtask in harbour like in xharbour
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Backgroundtask in harbour like in xharbour
Posted: Wed Jul 09, 2025 02:09 PM
Hi,

In xHarbour I use a backgroundtask to start a external program that creates a text-file, and this file I import in my program.

I'm converting this to UT with Harbour, but I notice that that doesn't exist.
Is there something simular in Harbour

      hb_IdleAdd( {|| hb_BackGroundRun() } )
      obck = hb_BackGroundAdd( {|| myfunction() }, 5000, .T. )
      SET BACKGROUND TASKS ON
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 231
Joined: Fri Jul 20, 2012 01:49 AM
Re: Backgroundtask in harbour like in xharbour
Posted: Wed Jul 09, 2025 05:33 PM
Not sure if is the same but
hb_threadStart( {|| myfunction() } )
in case you need pass argument
hb_threadStart( @myFunction(), 5000, .t. ) 

or 

hb_threadStart( { | n, l | myFunction( n, l ) }, 5000, .t. )
Regards,

Lailton Fernando Mariano
Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: Backgroundtask in harbour like in xharbour
Posted: Wed Jul 09, 2025 06:39 PM

Thank you,

I will try it.

I couldn't find anything about this in the documentation op Harbour..

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite

Continue the discussion