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)
Printable View
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)
many people has already done this. you don't need to do it anymore :p j/k......
you just ge teh hwnd, and then use the systray code, and assign a picturebox or something for the callback message.
no luck..
heres what im using
nid and nid2 are NOTIFYICONDATACode: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
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)
Try having a second form add the icon. Maybe the function only allows one tray icon per hwnd.
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?
http://www.vbapi.com/ref/n/notifyicondata.html
Try messing with the uID member of the NOTIFYICONDATA type.