Trim example for Access 2.0

This example trims one-tenth from the bitmap and repaints the image.

NewLeft = Me![LEAD1].Object.BitmapWidth * .1
NewTop = Me![LEAD1].Object.BitmapHeight * .1
NewWidth = Me![LEAD1].Object.BitmapWidth * .8
NewHeight = Me![LEAD1].Object.BitmapHeight * .8
Me![LEAD1].Object.Trim NewLeft, NewTop, NewWidth, NewHeight

' Set variables for the position and size of the display rectangle.
ViewWidth = Me![LEAD1].Object.ScaleWidth
ViewHeight = Me![LEAD1].Object.ScaleHeight

' Set the image display size to match the LEAD control
Me![LEAD1].Object.SetDstRect 0, 0, ViewWidth, ViewHeight
Me![LEAD1].Object.SetDstClipRect 0, 0, ViewWidth, ViewHeight
Me![LEAD1].Object.ForceRepaint