Alpha channel transparent

Discussion in 'Questions (Windows Mobile)' started by Byak@, Apr 12, 2009.

  1. Byak@

    Byak@ Active Member Licensed User

    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!!!!)

    i'm see it in miranda and it is very nice))
    [​IMG]
     
  2. agraham

    agraham Expert Licensed User

    What's the difference?

    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 :(
     
  3. Byak@

    Byak@ Active Member Licensed User

    in screenshot text is not transparented...

    As I understand it can not be done with Basic4ppc?:(
     
  4. agraham

    agraham Expert Licensed User

    I see what you mean.
    IF I added this to the FormEx library is there anything else you think might be useful?
     
  5. Byak@

    Byak@ Active Member Licensed User

    of course! this is a big plus for basic4ppc and this will further bring it to other programming languages

    i'm look forward to this :-[
     
  6. agraham

    agraham Expert Licensed User

    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.
     
  7. Byak@

    Byak@ Active Member Licensed User

    i'm don't understand =((
     
  8. agraham

    agraham Expert Licensed User

    I won't be doing it!
     
    Last edited: Apr 17, 2009
  9. Byak@

    Byak@ Active Member Licensed User

    :-(
    Erel what you say about it?it is very important for me =(((
     
  10. Erel

    Erel Administrator Staff Member Licensed User

    Maybe in the future, but as it is a desktop-only feature it will not have high priority.
     
  11. sitajony

    sitajony Active Member Licensed User

    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...
     
  12. ExcludeReality

    ExcludeReality Active Member Licensed User

    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
     
  13. Byak@

    Byak@ Active Member Licensed User

    Yes, i'm do it some month ago and it is work fine,see sample)
     

    Attached Files:

  14. sitajony

    sitajony Active Member Licensed User

    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...
     
  15. Byak@

    Byak@ Active Member Licensed User

    eeem...what differense with my sample and why hide PictureBox?
     
  16. sitajony

    sitajony Active Member Licensed User

    I was in wrong ;) I wanted hide the picturebox for few ms and show it with the screenshot who is behind it but there'll be a problem...
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice