Message Box in Windows Service
Posted on 2010-08-16
I have recently picked up programming again after a few years of not really doing any. I was previously used to VB 6 coding, but have now made the jump to VB.net 2010.
I have never created a Windows Service before so am trying to create a service that interacts with the desktop in a way that will allow me to show a message box.
For my first windows service sample/test app I wanted to create a service with 1 timer that runs for 5 seconds and on the elapsed event to show a message box of the current time.
Whatever I try, whether I use a windows forms timer control or a system.timer or ticking interactive on the service propertys box, nothing seems to work and because the message box isn't showing im uncertain what the service is doing or if the timer is even working.
So the question is, how do I create a simple windows service that throws a message box up onto the screen showing the current time at each 5 or 10 second loop?