Bitmap to Icon conversion

  • Thread starter Thread starter Urs Vogel
  • Start date Start date
U

Urs Vogel

Hi

I have an image list with icons and would like to change the form icon
depending on an operating mode, but I couldn't figure out how to re-assign
an image from the image list to the form.icon property.

Thanks fo a hint.

Urs
 
* "Urs Vogel said:
I have an image list with icons and would like to change the form icon
depending on an operating mode, but I couldn't figure out how to re-assign
an image from the image list to the form.icon property.

\\\
Dim b As Bitmap = ...
Dim hIcon As IntPtr = b.GetHicon()
Dim i As Icon = Icon.FromHandle(hIcon)
Me.Icon = i
///
 
* "Cor Ligthert said:
I was always think how that was going,

I forgot to mention that the code will basically work, but not the
original icon is restored.
 
Back
Top