I am trying to make a game using VB... I am making frogger... and when he is on the grass I want the colour around the frog to be green then grey when he is on the road... so instead of setting the colour for each of them and having separate sprites(images) for each change and adding 200+ lines to the code. Is there a way to set the background colour of the image to transparent??????????

of course there is... by the way what code are you using in displaying the image... is it in a picture box? or directly drawn in the form...

my suggestion is use first a USERCONTROL...
create an image, make the background of the image MAGENTA!!!!
for masking issues.. save it to bmp for high resolution.
set the maskimage property to your image and mask color to the background of your image(ex MAgenta)..

if my explanation is not good.. try vbcode.com and look for a game that do ttransparency.. theres a lot there..

i hope it helps

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.