CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: Systray icons

  1. #1
    Join Date
    Jun 2007
    Posts
    12

    Question Systray icons

    Hello,

    I'd like to know how could i get the system tray icons in my app. Can anyone show me some solution?

    Thanks

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: Systray icons

    Do you mean the NotifyIcon which is availasble in your Toolbox ¿

  3. #3
    Join Date
    Jun 2007
    Posts
    12

    Re: Systray icons

    Quote Originally Posted by HanneSThEGreaT
    Do you mean the NotifyIcon which is availasble in your Toolbox ¿
    nope, i mean all the other programs' notification icons in the system tray. for example the volume indicator or the network status indicator which is putted there by windows...

  4. #4
    Join Date
    Jun 2005
    Location
    JHB South Africa
    Posts
    3,772

    Re: Systray icons

    Quote Originally Posted by geeq
    nope, i mean all the other programs' notification icons in the system tray. for example the volume indicator or the network status indicator which is putted there by windows...
    That is a 'NotifyIcon' that is used... Check out this app in VS 2005 for a working example of a how to use The 'Notifyicon'

    Gremmy..
    Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving Images , Animation 1 , 2 , 3 , User Controls
    WPF Articles : 3D Animation 1 , 2 , 3
    Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
    Find me in ASP.NET., VB6., VB.NET , Writing Articles, My Genealogy, Forum
    All VS.NET: posts refer to VS.NET 2008 (Pro) unless otherwise stated.

  5. #5
    Join Date
    Jun 2007
    Posts
    12

    Re: Systray icons

    Quote Originally Posted by GremlinSA
    That is a 'NotifyIcon' that is used... Check out this app in VS 2005 for a working example of a how to use The 'Notifyicon'

    Gremmy..
    No, that's not. I know how to use the NotifyIcon control in vb.net. I mean i want all the icons in the system tray and hide them. Not the one i add with my app but all the others added there from an other app.

  6. #6
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: Systray icons

    If we had know this, you most probably would have had the solution by now

    What you need to do is to use the FindWindow and FindWindowEx APIs to get access to the Shell_TrayWnd, which is the Notification area. You can also use the same APIs to then get access to TrayNotifyWnd, SysPager, ToolbarWindow32 inside Shell_TrayWnd.

    I hope it helps

  7. #7
    Join Date
    Jun 2007
    Posts
    12

    Re: Systray icons

    well, i can get the hwnd of the systray and the notification area. The problem is that i need to get each and every icons and be able to act with them. Actually what i wanna do is a taskbar-like thing. And that's why i need the code for this. or at least some guide.

  8. #8
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,284

    Re: Systray icons

    Yes, that is where you'd need to use FindWindowEx then, to find the child windows inside Shell_TrayWnd. You need to specifically look at SysPager, ToolbarWindow32.

    SHould I try to work out like a small sample for you ¿

  9. #9
    Join Date
    Jun 2007
    Posts
    12

    Re: Systray icons

    Quote Originally Posted by HanneSThEGreaT
    Yes, that is where you'd need to use FindWindowEx then, to find the child windows inside Shell_TrayWnd. You need to specifically look at SysPager, ToolbarWindow32.

    SHould I try to work out like a small sample for you ¿
    Okay, i got window handle of the systray area but it has some toolstrip button like thingies which i don't know how to find.

    A sample would be great, really great! Thanks;

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured