"Armin Zingler" <az*******@freenet.dewrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
>" Frank" <fr***@a-znet.comschrieb
>>
"Armin Zingler" <az*******@freenet.dewrote in message
news:ew**************@TK2MSFTNGP04.phx.gbl...
" Frank" <fr***@a-znet.comschrieb
Maybe I missed something but all I didn't see anything in the
example that related to saving a bitmap in an icon
I thought you have a bitmap and you want to make an Icon from the
Bitmap, then save the Icon as a file.
I did.
I should of said "bitmap as an icon file"
I just looked at the site again and I see what you were getting at.
I can create an Icon from the bitmap.
Now I need to find out how to write it.
I know the format and was focused on building the data in menory and
then writing it. But I didn't hnow how to get the inage data from
the bitmap. That's what I thought you were helping with. Actually I
see now it is more compicated then just copying the image data from
the bitmap.
Given that I get a Icon from the bitmap do I serialize it to write
it? (I know only the word serialize - never used it.)
Ok, you do have an Icon now, did I get this right? Then call the Icon's
Save method.
Thanks for all the help.
I didn't find the right combination when I looked and figured I have to
write the file low level.
Guess I was influenced by an MS note I saw that said:
Bitmap.Save(..,Imaging.ImageFormat.Icon) wasn't available in GDI+
Q316563 says - GDI+ component of the .NET Framework does not have an encoder
that allows you to save files as WMF, EMF, or ICON files.
I wonder why not if all they had to do is:
Bitmap.GetHicon returns a handle to and Icon
Icon.FromHandle to get an Icon object
Icon.Save to write the file.
Maybe because - Icon.FromHandle() method demands
a.. SecurityPermission for access to unmanaged code. Related enumeration
UnmanagedCode.
means it can't be in G++. I don't know anything about this secutity stuff.
I'm going to try it now. Thanks again
>
Armin