To Create a system Tray application in Windows-CE, put some code like:
CSystemTray m_TrayIcon; // Member variable of some class
...
// in some member function maybe...
m_TrayIcon.Create(pParentWnd, WM_MY_NOTIFY, "Click here",
hIcon, nTrayIconID);
Eg. For a non-MFC tray icon, do the following:
Collapse
CSystemTray m_TrayIcon; // Member variable of some class
...
// in some member function maybe...
m_TrayIcon.Create(hInstance, NULL, WM_MY_NOTIFY,
"Click here", hIcon, nID);
// Send all menu messages to hMyMainWindow
m_TrayIcon.SetTargetWnd(hMyMainWindow);
As found here:
http://www.codeproject.com/KB/shell/systemtray.aspx
To create a system tray application in Windows XP or Windows 7/Vista, put some code like this in your project:
private void Form1_Resize(object sender, System.EventArgs e)
{
if (FormWindowState.Minimized == WindowState)
Hide();
}
and this to handle the system tray click
private void notifyIcon1_DoubleClick(object sender,
System.EventArgs e)
{
Show();
WindowState = FormWindowState.Normal;
}
This and more information found at :
http://www.developer.com/net/net/article.php/3336751/C-Tip-Placing-Your-C-Application-in-the-System-Tray.htm