This is only a very basic example, but I think it demonstrates the functionality you're looking for:
Add 2 Pictureboxes to a Form and Load a Picture into Picture1..
Code:Private Sub Form_Load() Picture1.AutoRedraw = True Picture2.AutoRedraw = True Picture2.Visible = False Picture1.ScaleMode = vbPixels Picture2.ScaleMode = vbPixels Picture2.Move 0, 0, Picture1.Width, Picture2.Height Picture1.MousePointer = vbCrosshair End Sub Private Sub Command1_Click() Static bZoom As Boolean bZoom = Not bZoom If bZoom Then 'Zoom in 10x on Top Left of Image With Picture1 Picture2 = Picture1 .PaintPicture .Picture, 0, 0, .ScaleWidth, .ScaleHeight, 0, 0, .ScaleWidth / 10, .ScaleHeight / 10 Picture1 = .Image End With Else 'Zoom Back out to 100% Picture1 = Picture2.Image End If End Sub Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) If Button = vbLeftButton Then 'Draw on Normal Sized Picture Picture2.PSet (X / 10, Y / 10) With Picture1 'Recopy Zoomed Image to Give Illusion of Drawing on Zoomed Image.. .PaintPicture Picture2.Image, 0, 0, .ScaleWidth, .ScaleHeight, 0, 0, .ScaleWidth / 10, .ScaleHeight / 10 End With End If End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]




Reply With Quote