Is there a decent way in VB to execute code based on process status? I want my code to begin an external process, then wait until it's done before killing it.

The process is a Word.Print. I need to wait for it to finish sending before closing Word.

I have a ****e way in VB to do it, by checking the BAckground printing status of word in a do...loop, but that hogs the processor and makes the whole thing take bloody ages.

I've been studying some C-based notes at Uni about semaphore (flag) process management, where by using the kernel.h library, I think, you can make a process wait on a semaphore to be signalled before it can continue. I gather this is very low-level, and some of the basics in developing an OS, but I'd like an equivalent for a VB app....

Are you the GReen Fairy, I 've been seeking?

See my sig for the main thread link.

Cheerio.