VB colorkey ?

Started by
3 comments, last by mxrss 19 years, 4 months ago
Hi, I want to display a bitmap on a form (in VB) and "make" a certain color of the bitmap invisible (like colorkeys in dx). Does anyone know how I could do it ? thx :) Quak
Advertisement
VB doesn't inherently support color keying. Instead, try using a image that includes transparency in it. A GIF is a good choice.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
it does support color keying. i remember doint it when i made a game. you are going to have to create masks (a black and white image of the sprite) and blit both of them. look into the Paint function, there should be something about it, or look into bitblt. i know htere are protocols for things like vbSrcCopy and things like that to do transparent blits, look it up on google.
---------Coming soon! Microcosm II.
Quote:Original post by xSKOTTIEx
it does support color keying. i remember doint it when i made a game. you are going to have to create masks (a black and white image of the sprite) and blit both of them. look into the Paint function, there should be something about it, or look into bitblt. i know htere are protocols for things like vbSrcCopy and things like that to do transparent blits, look it up on google.

That's not colorkeying, that's masking. Color keying is when you specify a color and any pixel of that color is ignored during the blitting process. Masking is totally a different process.

To OP, VB doesn't support color keying. Use masking to achieve the same effect.
i rember once seeing a artcle on planet source code on how to creae a color key blitter. Which is possible. But i forgot where the link is. Of course using DX color key is probablly easier and faster because its optimized code. and is this Vb or vb.net. You can use transparecny in .net "nativly"

- Mike

This topic is closed to new replies.

Advertisement