-
May 9th, 2009, 02:43 AM
#1
Need to show application in SystemTray Hide it in Task Managaer
Hi To ALL!!!
I Need Some help. I did to show my application in System Tray. Now i wanna to hide the application in Task Manager.
I've find this code in Net to show in system tray. Can any one tell how to hide it in Task Manager.
BOOL CEXDlg::TrayMessage(DWORD dwMessage)
{
CString str(_T("Internet Everywhere"));
NOTIFYICONDATA nid;
nid.cbSize = sizeof(NOTIFYICONDATA);
nid.hWnd = m_hWnd;
nid.uID = IDI_TRAYICON;
nid.uFlags = NIF_MESSAGE|NIF_ICON;
nid.uCallbackMessage = MYWM_NOTIFYICON;
VERIFY (nid.hIcon = LoadIcon(AfxGetInstanceHandle(),MAKEINTRESOURCE(IDI_TRAYICON)));
nid.uFlags = NIF_MESSAGE|NIF_ICON|NIF_TIP;
lstrcpyn(nid.szTip, (LPCTSTR)str, sizeof(nid.szTip)/sizeof(nid.szTip[0]));
return Shell_NotifyIcon(dwMessage, &nid);
}
Thanks & Regards
Arjun
-
May 9th, 2009, 09:54 AM
#2
Re: Need to show application in SystemTray Hide it in Task Managaer
Originally Posted by tgm.arjun09
I Need Some help. I did to show my application in System Tray. Now i wanna to hide the application in Task Manager.
I've find this code in Net to show in system tray. Can any one tell how to hide it in Task Manager.
Why would you want to do that? That doesn't make any sense whatsoever.
EDIT:
Wait, do you mean you want to create a service? That is, an application that doesn't show up in the task bar but only in the system tray?
Last edited by D_Drmmr; May 9th, 2009 at 10:02 AM.
Cheers, D Drmmr
Please put [code][/code] tags around your code to preserve indentation and make it more readable.
As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky
-
May 9th, 2009, 10:11 AM
#3
Re: Need to show application in SystemTray Hide it in Task Managaer
You will need to hide your window to not show it in task manager.
But it would still show in the processes tab.
Code:
ShowWindow(m_hWnd, SW_HIDE);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|