Dim Path As New GraphicsPath()
Dim g As Graphics = Me.CreateGraphics
Dim b As New Bitmap("G:\新建文件夹\icon_eek.gif")
Dim x, y, i As Long
Dim rect As Rectangle
'取得(1,1)位置的象素点是因为要把图片的背景边框去掉
Dim colorFirst As Color = b.GetPixel(1, 1)
For x = 0 To b.Width - 1
For y = 0 To b.Height - 1
If b.GetPixel(x, y).Equals(colorFirst) Then
Else
rect = New Rectangle(x, y, 1, 1)
Path.AddRectangle(rect)
End If
Next y
Next x
然后按照这个路径去画就可以了。