TransparencyKey and Paintbox

  • Thread starter Thread starter kevin
  • Start date Start date
K

kevin

How do I get a bitmap to display with transparency on a form? I've used
exactly the same colour (green: $40FF40) on the form and the bitmap and
the colour on the form is transparent, but the colour on the bitmap
remains green. I've even tried using e.Graphics.DrawImage in the Paint
event to see if that worked, but it didn't.

The TransparencyKey property almost seems useless if you can't use it
with bitmaps!!
 
Oops... my mistake... I am using a Windows.Forms.PictureBox!! :-) :-(
Still doesn't work. I can even get transparent edit boxes (my, how
useful that is... NOT!), but the picture box seems to ignore the form
transparency.
 
Ok it falls into one of the F*#& controls that MS didn't
bother to do 100% managed.

I just did a test and it doesn't use the form to paint.
It's a ComCtr and they just wrapped around it.

I have a fix for this issue, check out this project.

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?
txtCodeId=1332&lngWId=10

This should help you out.

Though I don't know if it will answer your problem, though
it would at least expline why it doesn't work.

Joe
-----Original Message-----
Oops... my mistake... I am using a
Windows.Forms.PictureBox!! :-) :-(
 
Unfortunately I couldn't download it - got an error trying to download.
If anyone else has an actual solution to the problem I've experienced
that would be nice.

Thanks,
Kevin.
 
Back
Top