SetSrcClipRect example for Visual Basic

Note: Also works with Access 95 and 97.

This example crops the image by reducing the source clipping area and repaints the image.

' Declare local variables
Dim NewLeft, NewTop, NewWidth, NewHeight
NewLeft = LEADRasterView1.SrcClipLeft+ (LEADRasterView1.SrcClipWidth * 0.1)
NewTop = LEADRasterView1.SrcClipTop + (LEADRasterView1.SrcClipHeight * 0.1)
NewWidth = LEADRasterView1.SrcClipWidth * 0.8
NewHeight = LEADRasterView1.SrcClipHeight * 0.8
If (NewWidth > 1) AND (NewHeight >1) Then
   LEADRasterView1.SetSrcClipRect NewLeft, NewTop, NewWidth, NewHeight
End If
LEADRasterView1.ForceRepaint