Adding a tray icon for a console app?

M

melon

Hello,

I have written a console application, but now I would like to add a
notify icon in the system tray. What is the easiest way to do it? It
would be painful if I have to convert it to a Windows App.

Thanks.
 
N

Nicholas Paldino [.NET/C# MVP]

melon,

The problem with the console app is that there is no pump for windows
messages. You could run a message pump in a separate thread, and then have
a NotifyIcon class instance that was created in that thread. It's not going
to be pretty, but I think it is possible.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top