I've been working on this project on and off based on BrowserUk's excellent advice since this thread was made, and now it's pretty much done.
One issue I have is that when the GUI window is closed, the other thread keeps running. I've hidden the console window, so the only way to close it is via the task manager. Is there a way to automatically end the other process when the GUI window is closed or crashes?