I had a look at this problem and I resolved to use a client server approach.
My plan is to have the server running in its own process (.exe) and provide clients with a library (.dll) that ease access and handling of the server calls. This is to my mind the most efficient way I've seen to achieve this.
The advantage of this solution is to allow more than one client to use the server at any time.
You can then view messages as being client request and server response. All of this using active objects.
// bring it to the background
However, it's up to you that where to place this loop so that when a user brings the app to the frontground, it will send itself to the background after a few second if the user does not want to terminate the task.