Dst... example for Visual Basic

Note: Also works with Access 95 and 97.

' Declare local variables
Dim ClHeight, ClWidth
' Set variables for the client area of the control.
ClHeight = LEADRasterView1.ScaleHeight
ClWidth = LEADRasterView1.ScaleWidth
'Calculate the values to zoom in by 10 percent and center the image.
LEADRasterView1.PaintSizeUseDPI = False
LEADRasterView1.DstWidth = LEADRasterView1.DstWidth * 1.1
LEADRasterView1.DstHeight = LEADRasterView1.DstHeight * 1.1
LEADRasterView1.DstTop = (ClHeight - LEADRasterView1.DstHeight) / 2
LEADRasterView1.DstLeft= (ClWidth - LEADRasterView1.DstWidth) / 2
'Set the clipping area to the same as the destination rectangle
LEADRasterView1.DstClipWidth = LEADRasterView1.DstWidth
LEADRasterView1.DstClipHeight = LEADRasterView1.DstHeight
LEADRasterView1.DstClipTop = LEADRasterView1.DstTop
LEADRasterView1.DstClipLeft = LEADRasterView1.DstLeft
'Redisplay the image
LEADRasterView1.ForceRepaint