The days of Avalon have not come yet and Gdi Plus is surely a nice API to create wonderfull UI whith transparency and gradients, but it has a plumbing caveats : It cannot benefit of graphic cards acceleration.
Let's see how to wrap Gdi gently in Managed Code to take benefit of it...
The problem with underlying managed APIs is that you never really know how they behave. Documentation is the key of using this kind of API accurately. Unfortunately, writing documentation is very tedious, and implementation details are so easy to forget…
This is what happens with Image.FromStream. Yesterday, I was talking about the ‘move to stream start’ issue, and today I’ll take about the issue described in the KB814675 article
Since Buz is gone skiing, I'm alone to code the PixVillage next version... and I can tell you there will be a lot of good things in it.
But that's not what I wanted to talk about. You've surely already loaded a Image from a Stream. This is really easy... except when the image is not as the beginning of the stream. There's a simple and elegant workaround to make Gdi+ read image from where you want.
Has Buz said, there are everyday a lot of things to solve to make a software like PixVillage work. C# and the .Net framework are really nice tools to develop fast, but there are still so much things you have to do yourself !
This Article focus on the submenu arrow when drawing OwnerDraw menus. Where it appears that Gdi+ and Gdi do not always behave as you might think...