Problem : transparent titlebar icon
Posted: Tue Sep 09, 2008 1:57 am
Hi,
The SysTray icon and Taskbar icon are transparent.
I want to understand why my Titlebar icon is not tranparent.
The SysTray icon and Taskbar icon are transparent.
I want to understand why my Titlebar icon is not tranparent.
Code: Select all
w=800
h=600
win=OpenWindow(1,0,0,w,h,"Animated Icon Titlebar",$C80001)
img=CreateImage(#PB_Any,16,16)
StartDrawing(ImageOutput(img))
FrontColor(#Red)
Box(0,0,16,16)
StopDrawing()
For i=1 To 16
CreateImage(i,16,16)
*Bitmap.LONG=IsImage(i)
DeleteObject_(*Bitmap\l)
msk=CreateImage(#PB_Any,16,16)
StartDrawing(ImageOutput(msk))
DrawingMode(0)
FrontColor(#Black)
Box(0,0,16,16)
FrontColor(#White)
y=Random(12)
Box(00,(y+0),4,16)
Box(04,(y+12),4,16)
Box(08,(y+8),4,16)
Box(12,(y+4),4,16)
StopDrawing()
NewIcon.ICONINFO
NewIcon\fIcon=1
NewIcon\hbmMask=ImageID(msk)
NewIcon\hbmColor=ImageID(img)
*Bitmap\l=CreateIconIndirect_(@NewIcon)
Next
AddSysTrayIcon(1,win,ImageID(ico+1))
Repeat
e=WaitWindowEvent()
ico=(ico+1)%16
SendMessage_(win,#WM_SETICON,0,ImageID(ico+1))
AddSysTrayIcon(1,win,ImageID(ico+1))
Until e=#PB_Event_CloseWindow