BackErase example for Access 2.0

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

Me![Lead1].Object.BackErase = False
Me![Lead1].Object.AutoRepaint = False
Me![Lead1].Object.AutoScroll = False

'Calculate the values to zoom out by 10 percent and center the image.
Me![Lead1].Object.DstWidth = Me![Lead1].Object.DstWidth * 0.9
Me![Lead1].Object.DstHeight = Me![Lead1].Object.DstHeight * 0.9
Me![Lead1].Object.DstTop = (Me![Lead1].Object.ScaleHeight - Me![Lead1].Object.DstHeight) / 2
Me![Lead1].Object.DstLeft = (Me![Lead1].Object.ScaleWidth - Me![Lead1].Object.DstWidth) / 2

'Set the clipping area to the same as the destination rectangle
Me![Lead1].Object.DstClipWidth = Me![Lead1].Object.DstWidth
Me![Lead1].Object.DstClipHeight = Me![Lead1].Object.DstHeight
Me![Lead1].Object.DstClipTop = Me![Lead1].Object.DstTop
Me![Lead1].Object.DstClipLeft = Me![Lead1].Object.DstLeft

'Redisplay the image
Me![Lead1].Object.ForceRepaint