Capture example for Access 2.0

This example captures the current screen and displays the captured image with scroll bars.

'Turn on the automatic display rectangles.
Me![LEAD1].Object.AutoSetRects = True

'Set the scale mode to twips temporarily
OldMode = Me![LEAD1].Object.ScaleMode
Me![LEAD1].Object.ScaleMode = 1

CaptureLeft = 0
CaptureTop = 0
CaptureWidth = Me.WindowWidth
CaptureHeight = Me.WindowHeight
Me![LEAD1].Object.Capture 0, CaptureLeft, CaptureTop, CaptureWidth, CaptureHeight
Me![LEAD1].Object.AutoScroll = True
Me![LEAD1].Object.ForceRepaint

'Set the scale mode to the previous mode
Me![LEAD1].Object.ScaleMode = OldMode