Available in the LEADTOOLS Imaging toolkit. |
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.
Lead1.BackErase = False
Lead1.AutoRepaint = False
Lead1.AutoScroll = False
'Calculate the values to zoom out by 10 percent and center the image.
Lead1.DstWidth = Lead1.DstWidth * 0.9
Lead1.DstHeight = Lead1.DstHeight * 0.9
Lead1.DstTop = (Lead1.ScaleHeight - Lead1.DstHeight) / 2
Lead1.DstLeft = (Lead1.ScaleWidth - Lead1.DstWidth) / 2
'Set the clipping area to the same as the destination rectangle
Lead1.DstClipWidth = Lead1.DstWidth
Lead1.DstClipHeight = Lead1.DstHeight
Lead1.DstClipTop = Lead1.DstTop
Lead1.DstClipLeft = Lead1.DstLeft
'Redisplay the image
Lead1.ForceRepaint