Depending on what transparency you need, you can choose any of these options:
1.) If you have an image with a specific part that needs to be completely transparent, you can use ImageAttributes.SetColorKey () to set one transparent color, and then pass it to Graphics.DrawImage. Your image should have one color (e.g. Color.Cyan), which will be completely transparent.
2.) If you want the whole image to be partially transparent, for example. for the fade in / fade out effect, you can P / call the AlphaBlend () function, as shown here .
3.) If you have an image with built-in transparency information, for example, a transparent PNG image that should be displayed on different color schemes, these previous methods will not work, and you need to use the COM IImage interface. The COM interaction from .NETCF is documented on this page (look for the "IImage interface" on this page).
Option 3 is the most flexible, but it also includes most implementation efforts. If you follow more information about what kind of image you want to transparently draw on the target platform, we can help more.
source share