The first thing I suggest you do is add a Module, if you haven't added one already. In the Declarations section of that Module you need to add the following code.
Declare Function BitBlt Lib "gdi32" Alias
"BitBlt" (ByVal hDestDC As Long, _
ByVal X As Long, ByVal Y As Long, ByVal
nWidth As Long, _
ByVal nHeight As Long, ByVal hSrcDC As
Long, ByVal xSrc As Long, _
ByVal ySrc As Long, ByVal dwRop As Long)
As Long
Public Const SRCCOPY = &HCC0020
Public Const SRCPAINT = &HEE0086
Public Const SRCAND = &H8800C6
Public RetVal as Long
The hDestDC is the destination object where
you wish to put the picture. The destination here is referred to by
its hDC.
The X and Y
are the coordinates where you want the top left corner of that picture
to be on the destination.
The nWidth and nHeight
are the width and height of the picture that you want to put on the destination.
The hSrcDC is the source object that you
are getting the picture from. The source here is refered to by its
hDC.
The xSrc and ySrc
are the coordinates of the top left corner of the area in the source picture
where you want the copying to begin.
The dwRop is the raster operation, also
known as a BitwiseOperator. Its value specifies how to copy the area
defined as the source to the area defined as the destination. Those
value are as follows:
SRCCOPY Copy the image exactly how it is.
SRCPAINT Copy the image except what is
black.
SRCAND Copy the image except what is white.
The RetVal is just a Return Value that we are using to get the action started. it should become a non zero (meaning any number greater than zero) after the BitBlt statement has been executed. If it is zero than that is telling you that the execution of the statement has failed (You should check the statement for any errors).
Ok, so what do we need?



Now we need a surface object. In this example we will be using Form1. You don't have to use Form1. You can use any object that has an hDC.

Retval = Bitblt (Form1.hDC, 0, 0, 320, 200, Picture1.hDC, 0, 0, SRCCOPY)
This will put the picture in Picture1 (Fig 1) in the top left most corner of Form1. The next thing we need to do is lay down the mask for the sprite. The mask is important, it lets the computer know what areas are to be shown (In Fig 3, What is to be shown is black). We do this by executing this command:
Retval = Bitblt (Form1.hDC, 10, 10, 110, 189, DiscoMsk.hDC, 0, 0, SRCAND)
This will put the mask at the corner 10, 10 of Form1. And last, we need to lay the sprite over the mask. Remember how the black background of DiscoSpr (Fig 2) tells us what isn't to be seen, and how the white of DiscoMsk (Fig 3) isn't to be seen? Well the mask also tells us what in the sprite should be seen (the black parts of the mask). If we don't lay down the mask first the the colors behind the sprite, on the background, would bleed through. To lay down the Sprite we execute this code:
RetVal = Bitblt (Form1.hDC, 10, 10, 110, 189, DiscoSpr.hDC, 0, 0, SRCPAINT)
The first Picture Fig 4 show what the Form1 looks like after we place the background down and the mask on it. The second picture (Fig 5) shows what Form1 looks like after we place the sprite over the mask.
You may try this exactly how I have shown you above by saving these images to your hard drive. To get more familiar with BitBlt you may want to use your own images.

