Dst... example for Access 2.0

This example uses the destination rectangle properties to zoom in on an image.

' Set variables for the client area of the control.
ClHeight = Me![LEAD1].Object.ScaleHeight
ClWidth = Me![LEAD1]. Object.ScaleWidth

'Calculate the values to zoom in by 10 percent and center the image.
Me![LEAD1].Object.DstWidth = Me![LEAD1].Object.DstWidth * 1.1
Me![LEAD1].Object.DstHeight = Me![LEAD1].Object.DstHeight * 1.1
Me![LEAD1].Object.DstTop = (ClHeight - Me![LEAD1].Object.DstHeight) / 2
Me![LEAD1].Object.DstLeft = (ClWidth - 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