Visual Basic - Picture mask

Started by
1 comment, last by medovid 21 years, 7 months ago
I want to take an image or a picture box and take away the background color. Surprisingly the command button has a mask color property in which you can select a color to be masked but I want to do the same in a picture box or even better.. an image -unless someeone also has a way of making a picture stretch to the size of the picture box control like what you can do by images. by the way this is all in VB6 Thank you in advance,
Advertisement
Create A Transparent Bitmap


The hackers must have gotten into the system through the hyperlink!!

Invader''s Realm
To do anything fancy in VB with graphics, you will want to use the WIN32 api or DirectX.
If what you want to do is mask out bitmaps that get painted on to the screen(like for 2d animation), you need to create a picture box that will be your display area (think of picture boxes as windows, there is no making them transparent or irregular) and ''blit'' the bitmaps into it. You can use VB''s paintpicture method if you don''t like winapi but it is slower. regardless, you must paint two images, using different bit operatives (SRCAND then SRCPAINT - ithink) - First paint the black and white masked image, then paint the real mcoy. you can use the stretch variation to make the bitmap bigger or smaller. hope this helps.

This topic is closed to new replies.

Advertisement