Balloon Tooltip using Windows Service C#

1k views Asked by At

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

2

There are 2 answers

4
Bert Sinnema On BEST ANSWER

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!

3
Scott Chamberlain On

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.