Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

When I copy the controls image to the Clipboard, I lose transparency when pasting it into Paint and other viewers, but not when I paste it into another AlphaImage control, why?

0
Posted

When I copy the controls image to the Clipboard, I lose transparency when pasting it into Paint and other viewers, but not when I paste it into another AlphaImage control, why?

0

The Clipboard has very few image formats that are supported universally and those are the Bitmap, DIB, WMF, and EMF. When the control’s image was copied to the clipboard, if not one of those formats, it was converted to a bitmap. Bitmaps do not support transparency. It also always copies its own format, that supports transaprency, to the Clipboard which is recognized by all AlphaImage controls. You can always retrieve the custom format, by declaring a new instance of the stdGDIplusPicture class and calling its .LoadPicture, passing Clipboard as the 1st parameter.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123