Well if you need your button to appear over anything but a solid-color background you can't use mask transparency.

If you want to use alpha transparency you might have to go through a lot of gymnastics to created an anti-aliased premultipled alpha image using GDI so that you can render via AlphaBlend().

So you are probably going to have to render your button shape using GDI+ and then render it during the UserControl's Paint event using GDI+ as well. You could still get away with AlphaBlend() but for that you need to convert the GDI+ Image to a premultiplied alpha GDI Bitmap.


So maybe LaVolpe or somebody will chime in. But there have been a lot of GDI+ threads here lately so you may already find the pieces and parts you need described in one of them. If not it is just a matter of cracking open the GDI+ Flat API documentation and working out the details.


How did programmers with inadequate documentation consumption skills even get by in the days before globally accessible forum sites? Back when I was hiring programmers in the 1980s-1990s we always required passing a reading test based on a "how to" question and a stack of reference manuals. Now we even have search engines.

Even the MSDN Library documentation has decent search capabilities. Do people even know about the search expressions accepting quoted strings, AND, OR, NOT, NEAR, wildcards, etc? Or the "Match similar words" checkbox? It isn't Google, but it is pretty good.

Sadly the GDI+ Flat API isn't covered in any detail even in the October 2001 edition, the best one for VB6 programmers. It was still sort of "too new."