Tech Off Post

Single Post Permalink

View Thread: C# 2.0 convert Bitmap to Icon problem
  • User profile image

    Jorgie, by just changing the file extension, Windows Explorer seems to recognize it. But when it is used as a Windows Form icon, VS2005 throws an error, "Argument 'picture' must be a picture that can be used as a Icon".

    After some reading, it appears that to correctly do it, I have to manupulate Bitmap headers and Icon headers / structs myself based on Windows API documentation; and there will be quite some coding. That is rather odd to me since it is a known problem; nonetheless .NET 2.0 chooses not to address it.

    Thanks guys for the replies. I will attemp to do some coding and it is surely going to be an interesting experience. Wink