Mask used with transparent Picture Box question 
Author Message
 Mask used with transparent Picture Box question

I'm having some difficulty in creating a monochrome mask to be used in
creating a transparent image on a picture box.

Before I get to the question let me explain how I did manage to create a
transparent picture box......

1. I created a source PictureBox (SRC) that contains a color image with a
transparent color of pink.
2. I used the paintbrush program to convert the same image to B&W.  I
changed the pink color to black and the rest to white.  I saved it as a
monochrome bitmap (note: it tried saving as a color bitmap and it didn't
3. Back in VB I created a mask PictureBox (MASK) and used the monochrome
bitmap as the picture property.
4. I used the Blt function to make the transparent bitmap using my SRC,
MASK, and destination PictureBox (DEST).

This worked!

Now I tried the same thing but instead of using paintbrush I did some brute
force code to convert the SRC over to the MASK (using the PSet method).
The MASK image looked exactly like the bitmap I created using paintbrush so
I thought it would work with the Blt command......WRONG!
I also setting the MASK.picture = MASK.image but that didn't work.

So, after all of that my question is:

Can I use some API's to create the monochrome image on my MASK picture box.
How do I do it.  I've been trying for a while now and just can't do it.  I
won't complain if you bore me with details on how to do this.


Mon, 31 Jan 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Mask for transparent bitmap question

2. transparent form using a mask.

3. Mask for transparent bitmap question

4. Mask for transparent bitmap question

5. Mask's and Picture box

6. Transparent Picture Box

7. How to have transparent text label on top of picture box

8. overlaying a transparent image onto a picture box

9. Making a picture box transparent

10. Transparent background for BMP file in Picture Box

11. Transparent picture box?

12. Picture Box Transparent Bitmaps


Powered by phpBB® Forum Software