Tranparency key in vb.net 2003

dreamwalker

New member
Joined
Nov 14, 2006
Messages
3
Programming Experience
Beginner
Hi ALL!!!
I m using Vb.NET 2003. Recently I tried to create an irregular custom form using an image of bmp format. I use this image as backgroundimage picture and change form's transperancy color to 'black' which was my image's background color. But when i run this form i found the background color still visible. I tried this in vb.net 2005. And found myself satisfied.
Please !!!! somebody help me as i want to do this is vb.net 2003.

Thanks in advance.
 
Ok just did a quick test and having a background image with black on it doesn't work with black as the transparency key, but if you set the BackColor property to black transparency works just fine.

It does state on the tooltip info for the TransparencyKey that "A color which will appear transparent when painted on the form" - is an image not classed as being "painted"?

I'm wondering if it's a pallette issue? perhaps the black on the image isn't the same as the black that you're setting the key to... I'll run some tests.
 
Tried out Vis781's suggestion and it works fine - I still had to set the overall form's transparencykey to black and set the background colour to black as well, but it worked a treat.

This'll be handy for the splash screen on an app I'm coding :)
 
Back
Top