Icon problem in .NET

  • Thread starter Thread starter Mat
  • Start date Start date
M

Mat

I have icons, which i always use in VB6 but now in .NET, i can read error
"Code generation for property 'ImageStream' failed. Error was: 'Bitmaps
that are Icons can not be made transparent. Icons natively support
transparency. Use the Icon constructor to create an Icon.'


I don't understand what is wrong....

Please help
 
Hi,

Try something like this.

Dim bm As New Bitmap("c:\camera.bmp")

Dim ptrIco As IntPtr = bm.GetHicon

Dim ico As Icon

ico = Icon.FromHandle(ptrIco)



Ken
 
* "Mat said:
I have icons, which i always use in VB6 but now in .NET, i can read error
"Code generation for property 'ImageStream' failed. Error was: 'Bitmaps
that are Icons can not be made transparent. Icons natively support
transparency. Use the Icon constructor to create an Icon.'

What exactly are you doing? Post the code which raises this
exception/error.
 
no Code.
i just add imagelist from toolbox to the form.
in design mode, i add two icons to the images collection.
but when i click ok or compile the application i receive the above error
 
Back
Top