
Originally Posted by
Wokawidget
Like Merri said, I don't think it's possible to place XP icons in the systray using VB6
Woka
Maybe not via an Image list, but you can put XP icons on the system tray for XP & above. All you need is a valid icon handle which can be created from APIs (LoadIcon, CreateIconFromResourceEx, & others for example). A valid 32bpp icon can even be made into a stdPic via the often used PictureFromHandle function posted below if you can't lay your hands on a ready copy. Anyway, anything less than XP will attempt to display it, but obviously it won't display correctly.
Code:
Private Function PictureFromHandle(Handle As Long, picType As PictureTypeConstants) As IPicture
' Purpose: Create a standard picture object from a valid image handle
Dim lpPictDesc As PICTDESC
Dim aGUID(0 To 3) As Long
' convert memory icon to stdPicture
With lpPictDesc
.Size = Len(lpPictDesc)
.Type = picType
.hHandle = Handle
.hPal = 0
End With
'--- fill in magic IPicture GUID {7BF80980-BF32-101A-8BBB-00AA00300CAB}
aGUID(0) = &H7BF80980
aGUID(1) = &H101ABF32
aGUID(2) = &HAA00BB8B
aGUID(3) = &HAB0C3000
'--- create picture from bitmap handle
Call OleCreatePictureIndirect(lpPictDesc, aGUID(0), True, PictureFromHandle)
End Function
Example. The Heart is a 32x32 XP, alphablended icon