Results 1 to 7 of 7

Thread: AlphaTransparent bitmap

  1. #1

    Thread Starter
    Addicted Member vigge89's Avatar
    Join Date
    May 2002
    Location
    Sweden
    Posts
    172

    AlphaTransparent bitmap

    I would like to add the feuture to my users to be able do use an 32bit Bitmap as my form-bakground.

    The form is currently making anything on the itself (pictures, controls etc.) which has the color pink (RGB(255,0,255)) completly transparent, and has the alphablending feuture (semi-transparent forms).

    I would like to know if anyone knows the techniques that programs like Samurize (.com) uses to load a 24bit PNG (with alphablending) into the app. I would like to skip the pink-transparency feuture in my app, and instead add 24bit PNG or 32bit Bitmaps feutures into it.

    I've tried loading a 32bit bitmap into a form's Picture-property, but this doesn't use the transparency feuter as i saw that the pixels which should be semi/completly transparent went white.

    Any ideas, clues, hints or examples is very appreciated!


  2. #2
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    Check this out. If it says it can't find a dll, I included it in the zip.

    Drag a picture file (preferably a 32-bit png so it can be translucent) into the form.
    Attached Files Attached Files
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  3. #3
    The picture isn't missing BuggyProgrammer's Avatar
    Join Date
    Oct 2000
    Location
    Vancouver, Canada
    Posts
    5,217
    And you need to drag the file onto the TOP slider. Not the bottom one.

    And here it is in action:
    Attached Images Attached Images  
    Remember, if someone's post was not helpful, you can always rate their post negatively .

  4. #4

    Thread Starter
    Addicted Member vigge89's Avatar
    Join Date
    May 2002
    Location
    Sweden
    Posts
    172
    great!
    now i just need to optimize the code to make it fit my project

    thanks!


  5. #5

    Thread Starter
    Addicted Member vigge89's Avatar
    Join Date
    May 2002
    Location
    Sweden
    Posts
    172
    just a question, is it possible to have a picture inside an picturebox also?


  6. #6

  7. #7

    Thread Starter
    Addicted Member vigge89's Avatar
    Join Date
    May 2002
    Location
    Sweden
    Posts
    172
    I have no idea on how to do this.

    The skinning part of my app loads all pictures for the app into variables (Dim var as Picture), and then the form-bakground's and the picturebox's (used as an button) pictures (.Picture) is set to their variables ('frmMain.Picture = imgBg' for example). I have no idea on how to use the code you gave for skinning picture-boxes, which have got different images for normal and down state (and Hover-state if possible). If anyone could give me ideas, advices or examples of this, i would be very grateful.

    Also, does anyone have any idea on what method of skinning is the best, simplest and/or fastest?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width