1

I'm writing a network broadcasting application that's only supposed to start up on remote command.

I started with a windows service with a listener that would open up a winform, but quickly realized that that doesn't work anymore because services can no longer change UI in anything but session #0 for some sort of security reasons.

My next idea was to have a system tray application instead of a windows service. Before I start down this path, is there a better way? An icon in the system tray that has no functionality seems inane, although I suppose there would be security problems that would come along with invisible processes.

tl;dr Is there a way to have some type of background process open up a user visible window?

NathanTempelman
  • 1,301
  • 9
  • 34
  • 1
    Check this out: http://stackoverflow.com/questions/4237225/windows-service-allow-service-to-interact-with-desktop – Chris Jul 14 '14 at 19:24
  • 1
    @Chris Yeah, only problem is here - "..note that as of Windows Vista, services are strictly forbidden from interacting directly with a user" – NathanTempelman Jul 14 '14 at 19:37
  • 1
    So I guess the short answer would be "no" then! I was thinking the discussions there on the same topic could be useful. My choice would be a monitor app, like sql server has! – Chris Jul 14 '14 at 19:45
  • 1
    Well, it does have functionality, it alerts the user. You can do so with NotifyIcon.ShowBalloonTip. Who can then click on it and your window will move in the foreground. Forget about shoving a window into the user's face, Windows has strong countermeasures against that. – Hans Passant Jul 14 '14 at 20:30
  • @HansPassant Aha tell that to the java updates. And don't worry, it's for displaying stuff on private networks of computers, not for annoying random users. – NathanTempelman Jul 15 '14 at 13:32

1 Answers1

0

No!*

.

.

*at least not while being compatible with newer versions of windows

Edit2: I ended up going with the system tray app approach, and it worked just fine

NathanTempelman
  • 1,301
  • 9
  • 34