BackErase example for Visual Basic

Note: Also works with Access 95 and 97.

This example turns off repainting of the background, then zooms out to show the effect when repainting.

LEADRasterView1.BackErase = False
LEADRasterView1.AutoRepaint = False
LEADRasterView1.AutoScroll = False
'Calculate the values to zoom out by 10 percent and center the image.
LEADRasterView1.DstWidth = LEADRasterView1.DstWidth * 0.9
LEADRasterView1.DstHeight = LEADRasterView1.DstHeight * 0.9
LEADRasterView1.DstTop = (LEADRasterView1.ScaleHeight - LEADRasterView1.DstHeight) / 2
LEADRasterView1.DstLeft = (LEADRasterView1.ScaleWidth - LEADRasterView1.DstWidth) / 2
'Set the clipping area to the same as the destination rectangle
LEADRasterView1.DstClipWidth = LEADRasterView1.DstWidth
LEADRasterView1.DstClipHeight = LEADRasterView1.DstHeight
LEADRasterView1.DstClipTop = LEADRasterView1.DstTop
LEADRasterView1.DstClipLeft = LEADRasterView1.DstLeft
'Redisplay the image
LEADRasterView1.ForceRepaint