On May 23, 2006, at 2:57 PM, Tristan wrote:
But Wait!
There is no Mask class for app.dockitem
it should be:
app.dockitem.mask.graphics.drawrect 0,0,128,128
Now what?
The DockItem transparency works like a Canvas. You use the Graphics
to draw a picture you created something like this:
Dim p As Picture = NewPicture(128, 128, 32)
Dim g As Graphics = p.Graphics
Dim m As Graphics = m.Mask.Graphics
// clear the mask so that it starts out as fully transparent:
m.ForeColor = &cFFFFFF
m.FillRect(0, 0, m.Width, m.Height)
// do icon drawing code here:
....
// now update the DockItem
App.DockItem.Graphics.ClearRect(0, 0, 128, 128) // erase old
content
App.DockItem.Graphics.DrawPicture(p, 0, 0)
App.DockItem.UpdateNow
What you are doing with Graphics.ClearRect is erasing the icon so
that you can draw a completely new one. If you want to expand the
existing dock icon (such as Mail adding the count of unread messages)
then you would instead use the DockItem.ResetIcon method.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>