Hello,
I'm also using TransparentBlt, but in C++, but the parameters are identical to what you are using, so here goes.
The last parameter of the TransparentBlt is the transparent color. In your case you use a VB define in a Win32 API call. I'm not sure if both are the same for black, so make sure the vbBlack is really ZERO.
Second, you are using LoadPicture. I suggest you switch to LoadImage, which is also a Win32 API call and will provide you better control over your bitmaps and how they are loaded.
Here a line in CPP, but you can still get the idea:
HBITMAP BitmapHandle = (HBITMAP)LoadImage(NULL,<f
The problem with VB controls and functions is that some images may have their palette rearranged for proper management. The key is that if you use Win32 API for bitmaps, do it all the way using the API, don't switch back and forth between Win32 and VB.
Note that in your TransparentBlt call, the last parameter must be the RGB value of your transparent color.
I hope this helps somehow. Let me know if you need more help.
--Eric Fortier
Main Topics
Browse All Topics





by: J_ZPosted on 2003-01-02 at 12:51:24ID: 7658010
Hi Da533:
I think you saw the same picture again and again because you didn't repaint your backbuffer or clear the screen memory.
If you are using a backbuffer paint you background on the backbuffer again, before you paint the sprite.