Computer Hope

Software => Computer programming => Topic started by: Stan Huang on January 10, 2014, 01:40:43 AM

Title: How to minimize my program into right-bottom's notification area
Post by: Stan Huang on January 10, 2014, 01:40:43 AM
I wrote a program which can launch other application programs. I hope my program can minimize into right-bottom's notification area after an application is launched automatically. How can I do? Any API I can call?
Title: Re: How to minimize my program into right-bottom's notification area
Post by: BC_Programmer on January 10, 2014, 10:38:01 AM
Notifications and the Notification Area (http://msdn.microsoft.com/en-us/library/windows/desktop/ee330740%28v=vs.85%29.aspx)

short answer: use the API function shell_notifyicon (http://msdn.microsoft.com/en-us/library/windows/desktop/bb762159(v=vs.85).aspx).
Title: Re: How to minimize my program into right-bottom's notification area
Post by: Stan Huang on January 12, 2014, 09:13:22 PM
Thanks. But the codes are all C++. My program is in C#. They can't be applied to my program.
Title: Re: How to minimize my program into right-bottom's notification area
Post by: BC_Programmer on January 12, 2014, 09:51:09 PM
Thanks. But the codes are all C++. My program is in C#. They can't be applied to my program.

The Windows API is C. You can use P/Invoke.

If you are using Windows Forms you can simply use the Windows Forms NotifyIcon control.