>Thanks Hilamr, you're right. "multithreading" is the correct term. And I'll try to run both tasks as separate EXE.
I use a Timer for some things, for instance, to check every two minutes whether a file called "maintenance.tmp" exists (this is a signal to close the application). You can use Timers for many such things, but they will not execute during a long query, for instance. So, if you need to run certain code no matter what happens, a separate EXE seams appropriate (or the other option that has been suggested, with a COM object).
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)