on Desktop.
for example we have transparent formex (TransparencyKey) and now we draw png image with alpha transparent. but our alpha thrasparent now has color as TransparencyKey.
how can be done alpha transparent? (NOT OPACITY!!!!)
This is not easily possible, even with the Door library. For a Form to support alpha transparency ir needs to have its ControlStyle SupportsTransparentBackColor set True, the default is False.
From MSDN : SupportsTransparentBackColor : If true, the control accepts a BackColor with an alpha component of less than 255 to simulate transparency.
Unfotunately the Forms' method, SetStyle, that does this is not a Public method and can only be called by another method belonging to the Form. It is not accessible to the Door library
Disappointment then I'm afraid. I tried this yesterday and SupportsTransparentBackColor doesn't work on a Form in the way expected . Googling around other people have tried this and found the same. It seems the only way to do it is to take over drawing the Form yourself at a low-level.
And if in C# we take a screenshot and we paste Control's image on the screenshot with the sames coordination and size and we return the final image? i'm building a lib for this...
The transparency will could real and maybe the opacity too...
That kind of transparency shouldn't be too hard to achive. Just take a screenshot before you show the form, cut out the part where the form will be positioned and turn down the brightness a bit. Then apply the image to the form. Of course, if the background changes the form will not adapt, unless you tie this routin to a timer event
Else we can just field an PictureBox in the Function and we hide this picturebox, get the picturebox's image, take a screenshot in the same location/dimension and modify the picturebox's image with the screenshot and the original image and show the picturebox...
I'll try...