sorry, one more question. if the problem is your main loop, you could kill your main loop's activity before launching the webbrowser; i.e check for a flag at the start if each loop, and make sure you delay long enough that the loop is done, or use a Semaphore, etc.