Have you tried this code?
Edit**VB Code:
Public Function GetByteArrayFromIcon(ByVal icoSource As Icon) As Byte() Dim byteArray As Byte() Using msIcon As New System.IO.MemoryStream icoSource.Save(msIcon) byteArray = msIcon.ToArray End Using Return byteArray End Function Public Function GetIconFromByteArray(ByVal bytSource As Byte()) As Icon Using msIcon As New IO.MemoryStream(bytSource) Dim myIcon As New Icon(msIcon) Return myIcon End Using Return Nothing End Function




Reply With Quote
I can't believe I totally missed the constuctor
