Results 1 to 6 of 6

Thread: How can you add multiple icons to the taskbar?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2000
    Posts
    1,195

    How can you add multiple icons to the taskbar?

    and set their icon to another windows icon?

    for example.. if vb was open, how can i add an icon in the systray and have the icon as the vb one? (and later add multiple icons for other programs)

  2. #2
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    many people has already done this. you don't need to do it anymore j/k......
    you just ge teh hwnd, and then use the systray code, and assign a picturebox or something for the callback message.
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2000
    Posts
    1,195
    no luck..

    heres what im using

    Code:
        With nid
            .cbSize = Len(nid)
            .hwnd = Me.hwnd
            .uId = vbNull
            .uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
            .uCallBackMessage = WM_MOUSEMOVE
            .hIcon = Me.Icon
            .szTip = "HideIE" & vbNullChar
        End With
        
        With nid2
            .cbSize = Len(nid)
            .hwnd = Me.hwnd
            .uId = vbNull
            .uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
            .uCallBackMessage = frmMain.Picture1
            .hIcon = Me.Icon
            .szTip = "HideIE" & vbNullChar
        End With
           
        Shell_NotifyIcon NIM_ADD, nid
        Shell_NotifyIcon NIM_ADD, nid2
    nid and nid2 are NOTIFYICONDATA

    with this code, it only adds one icon to the taskbar.. if i set the hwnd of the second to me.hwnd + 1, then 2 icons will appear, however if i move my mouse over the second one, it disappears..

    any idea how to add multiple icons (and use another programs icon as its icon)

  4. #4
    Frenzied Member Shawn N's Avatar
    Join Date
    Dec 2001
    Location
    Houston
    Posts
    1,631
    Try having a second form add the icon. Maybe the function only allows one tray icon per hwnd.
    Please rate my post.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Dec 2000
    Posts
    1,195
    but if iwanted to add x icons, id need x forms, in other words, the potential for a LOT of ram to be wasted..

    is there no other way to add multiple icons, and set their icon to another programs icon?

  6. #6
    Frenzied Member Shawn N's Avatar
    Join Date
    Dec 2001
    Location
    Houston
    Posts
    1,631
    http://www.vbapi.com/ref/n/notifyicondata.html

    Try messing with the uID member of the NOTIFYICONDATA type.
    Please rate my post.

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