Private Sub picCanvas_Resize()
Const X0 = 1440
Const Y0 = 1440
picCanvas.Cls
' Set scale mode to twips.
picCanvas.ScaleMode = vbTwips
' Set ScaleHeight to make Y increase upwards.
picCanvas.ScaleHeight = -picCanvas.ScaleHeight
' Make the origin 1 inch (1440 twips)
' from the lower left corner.
picCanvas.ScaleLeft = -X0
picCanvas.ScaleTop = -picCanvas.ScaleHeight - Y0
' Draw a box at the origin.
picCanvas.Line (0, 0)-Step(360, 360), , BF
' Draw a diamond centered at the origin.,
picCanvas.Line (-720, 0)-Step(720, 720)
picCanvas.Line -Step(720, -720)
picCanvas.Line -Step(-720, -720)
picCanvas.Line -Step(-720, 720)
End Sub
|