FloaterDstClip... example for Access 2.0

The following code adjusts the destination clipping rectangle of the floater. You can test it by adding it to a new command button for the lesson described in Outlining, Dragging, and Pasting a Region. By default, the destination clipping rectangle for the floater is the full client area. This code gets the current values and uses them to reduce the size of the clipping rectangle.

'Declare local variables.
Dim AdjustX, AdjustY, NewLeft, NewTop, NewWidth, NewHeight

'Set variables to use for adjustment increments.
AdjustX = Me![LEAD1].Object.ScaleWidth / 20
AdjustY = Me![LEAD1].Object.ScaleHeight / 20

'Determine new values, based on adjustments of current values. 
NewLeft = Me![LEAD1].Object.FloaterDstClipLeft + AdjustX
NewTop = Me![LEAD1].Object.FloaterDstClipTop + AdjustY
NewWidth = Me![LEAD1].Object.FloaterDstClipWidth - (2 * NewLeft)
NewHeight = Me![LEAD1].Object.FloaterDstClipHeight - (2 * NewTop)

'Set the clipping rectangle to the new values.
Me![LEAD1].Object.SetFloaterDstClipRect NewLeft, NewTop, NewWidth, NewHeight