0

I want to open a balloon tooltip using windows service. I can do it in Windows Forms. Is it possible using windows service ?

  • 1
    https://stackoverflow.com/questions/4237225/allow-service-to-interact-with-desktop-in-windows – Blorgbeard Aug 31 '17 at 18:04
  • Possible duplicate of [Allow service to interact with desktop in Windows](https://stackoverflow.com/questions/4237225/allow-service-to-interact-with-desktop-in-windows) – jHilscher Aug 31 '17 at 18:06
  • In the mentioned post, it explains how to interact with windows. But how to open a balloon tooltip with interacting from service ? Sorry I am a newbie to C# – Sanjay Krishnan C B Aug 31 '17 at 18:25

2 Answers2

1

I have implemented this service before and used a named pipe. Basically you create two applications.

  • A windows service projects which acts as the Named Pipe Server
  • A winforms application with a tray icon, a balloon and a Named Pipe Client

The windows service pushes messages towards the clients that are connected, could be multiple users on the systems running the winforms app.

The winforms app listens to messages on the pipe. Once the message comes in you can make the balloon pop up.

Here is a cool test project: https://www.codeproject.com/Tips/492231/Csharp-Async-Named-Pipes

Happy coding!

Bert Sinnema
  • 319
  • 2
  • 14
0

Not directly. A windows service does not run in the user's session, it runs in its own special "Service Session". Tooltips that show up in that session don't show up on the users desktop.

The way to get around this normally is to have a 2nd program that starts with the user's login and is not visible in the taskbar. That program uses some form of IPC (for example WCF) to talk to the service, the service can then tell the helper program to show a notification as needed.

Scott Chamberlain
  • 124,994
  • 33
  • 282
  • 431