SetSrcRect example for Access 2.0

This example zooms in on the image by reducing the source rectangle and repaints the image.

OldLeft = Me![LEAD1].Object.SrcLeft
OldTop = Me![LEAD1].Object.SrcTop
OldWidth = Me![LEAD1].Object.SrcWidth
OldHeight = Me![LEAD1].Object.SrcHeight
NewLeft = OldLeft + OldWidth * .1
NewTop = OldTop + OldHeight * .1
NewWidth = OldWidth * .8
NewHeight = OldHeight * .8
If (NewWidth > 1) AND (NewHeight >1) Then
   Me![LEAD1].Object.SetSrcRect NewLeft, NewTop, NewWidth, NewHeight
End If
Me![LEAD1].Object.ForceRepaint