Need to show application in SystemTray Hide it in Task Managaer
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Need to show application in SystemTray Hide it in Task Managaer

  1. #1
    Join Date
    Feb 2009
    Posts
    10

    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

  2. #2
    Join Date
    Jul 2005
    Location
    Netherlands
    Posts
    2,012

    Re: Need to show application in SystemTray Hide it in Task Managaer

    Quote Originally Posted by tgm.arjun09 View Post
    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

  3. #3
    Join Date
    Feb 2009
    Location
    India
    Posts
    444

    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);
    _Superman_
    I love work. It gives me something to do between weekends.

    Microsoft MVP (Visual C++)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center