Chris1234: You did not make the bitmap transparent!!!! All you did was make the image LOOK transparent on the Form. I opened up the File and it was still normal!! I was talking about actually making the image itself transparent
Sorry about that memory leak or whateva it was, cause I really havent had ne problems with it. Any way you can put the image on top of a different image and you can still see the other image behind it in the blank spots. R u talking about making the image transparent in your program or actually making the bitmap transparent.
hey I tried using your code but it does not work on my picture. can you tell me what picture1.hdc mean? you are taking the color for transparency from the picture's 0,0 position? can you explain the code in more detail since it is going way over my head
and can this code work on an imagebox? if not then what I insert an image inside a picturebox?
If you lost your left arm, your right arm would be left.
The TransparentBlt function has a memory leak that slowly chews up system and GDI resources until there aren't anymore available.
Eventually your program will crash and you will have to close it down. Fortunately windows should reclaim the resources as soon as your program thread stops, but that's not for certain.
I've attached an example program to demonstrate my program. I got critically low on resources after 300 or so TransparentBlts. If you are going to be writing a game, you will be doing ALOT more than that.
"On a long enough timeline, everyone's life expectancy drops to zero." - Fight Club
"The lights below
You know they'll bleed forever
Get back as the cores blow
Let me fall..." - Dismantled, "Cornered"