Private Sub Command1_Click()
Dim X As Single
Dim Y As Single
Dim x0 As Integer
Dim x1 As Integer
Dim y0 As Integer
Dim y1 As Integer
Picture1.Scale (1, 1)-(1120, 780)
For Y = 1 To 780 Step 100
For X = 1 To 1120
Picture1.Line (X, Y)-(1120, Y), vbRed
Next X
Next Y
For X = 1 To 1120 Step 100
For Y = 1 To 780
Picture1.Line (X, Y)-(X, 780), vbRed
Next Y
Next X
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Cls
Me.Print X, Y, Shift '鼠标位置
If Shift = 1 Then '
'
x0 = (Fix(X / 100)) * 100 + 1
x1 = x0 + 99 ' 鼠标所在区域
y0 = (Fix(Y / 100)) * 100 + 1
y1 = y0 + 99
Picture2.Scale (x0 * 2, y0 * 2)-(x1 * 2, y1 * 2) '在picture2里放大
End If
End Sub
Private Sub End_Click()
End
End Sub
改成如上,我以为能如愿放大,实际不成,错字那,不知道。请高手及版主帮忙解惑。谢谢!
Dim X As Single
Dim Y As Single
Dim x0 As Integer
Dim x1 As Integer
Dim y0 As Integer
Dim y1 As Integer
Picture1.Scale (1, 1)-(1120, 780)
For Y = 1 To 780 Step 100
For X = 1 To 1120
Picture1.Line (X, Y)-(1120, Y), vbRed
Next X
Next Y
For X = 1 To 1120 Step 100
For Y = 1 To 780
Picture1.Line (X, Y)-(X, 780), vbRed
Next Y
Next X
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Cls
Me.Print X, Y, Shift '鼠标位置
If Shift = 1 Then '
'
x0 = (Fix(X / 100)) * 100 + 1
x1 = x0 + 99 ' 鼠标所在区域
y0 = (Fix(Y / 100)) * 100 + 1
y1 = y0 + 99
Picture2.Scale (x0 * 2, y0 * 2)-(x1 * 2, y1 * 2) '在picture2里放大
End If
End Sub
Private Sub End_Click()
End
End Sub
改成如上,我以为能如愿放大,实际不成,错字那,不知道。请高手及版主帮忙解惑。谢谢!