I have the following code:

VB Code:
  1. Private Sub UpdateIcon(ByVal txt As String, ByVal col As Color)
  2.         Dim bmp As New Bitmap(16, 16)
  3.         Dim G As Graphics = Graphics.FromImage(bmp)
  4.         Dim oIcon As Icon
  5.         G.Clear(Color.FromArgb(cserver.BackgroundIcon))
  6.         G.DrawString(txt, New Font("Tahoma", 9, FontStyle.Bold), New SolidBrush(col), -2, 0)
  7.         oIcon = Icon.FromHandle(bmp.GetHicon)
  8.         StatusIcon.Icon = oIcon
  9.  
  10.     End Sub


Problem is that every time the function is called, the StatusIcon.Icon call leaks 2 GDI hanldes.

Is there an alternative implementation?
I checked MSDN and apparently this was fixed in Framework 1.0 SP2 for Form.Icon. I can't find a reference anywhere to NotifyIcon GDI Leaks.

Help! I'm comletely stuck on this!

Cheers,