I have this problem, I wrote a WinForms application, I have use it for a while with no problems. Next I just wrote a windows service to start/stop automatically my winforms app. But now the window is not shown, and in the task manager it's running. Besides, for testing my service, first it was a console app, so Console.WriteLine() was useful to display data, status, variables, etc, once it became a service, no console anymore. So, it's anything I'm missing?
Well, what I need is the service starting/stoping the winform application. It's a monitoring like. So, if the winform app is not running, creates a process, and starts it. But if is midnight, then the app should not be running, then the service finds the process and closes it. I don't want to turn the winform app into a service, or the service into a winform app.
I first thought just to put a shortcut to my winforms app in the "startup" folder to start it, but I need to close it, and/or restart it. So that's why I wrote the service.
Thanks!