DrawBitmap

                               +-0----+     +-0----+     +-0----+
>>-aButtonControl~DrawBitmap(--+------+--,--+------+--,--+------+--,-->
                               +-tarx-+     +-tary-+     +-srcx-+

   +-0----+     +-0-----+     +-0------+
>--+------+--,--+-------+--,--+--------+--)--------------------><
   +-srcy-+     +-width-+     +-height-+


The DrawBitmap method draws the bitmap of the associated bitmap button. You can also use this method to move a bitmap or part of it.

Contrary to the method DisplaceBitmap, which sets a permanent position for the bitmap, DrawBitmap immediately draws the bitmap, or part of it, at the specified position. If the button must be refreshed, the bitmap is drawn at the position set with DisplaceBitmap. DrawBitmap is used by ScrollBitmapFromTo, for example.

Arguments:

The arguments are:

tarx,tary

The position relative to the client area of the button where the bitmap is to be displayed. The default is 0,0.

srcx,srcy

The offsets that specify the first pixel in the bitmap to be displayed. If you omit these arguments, the pixel at position 0,0 is the first pixel displayed.

width,height

The width and height of the bitmap. If you omit these arguments or specify 0, the entire bitmap is displayed at the specified position. You can use these arguments to display only parts of the bitmap.

Return value:

0 if the bitmap could be drawn.

Note: You can use the DrawBitmap method to animate a bitmap by providing a bitmap that contains several images and use the offset and extension arguments to display a single image of the bitmap.