Private Sub PicMap_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
PicMapMoveXY.X = X
PicMapMoveXY.Y = Y
End Sub
Private Sub PicMap_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim CurPtInCSRegion As Boolean, i As Integer
If MoveFlg And Button = 1 Then
If (PicMap.Top + Y - PicMapMoveXY.Y > 1000) Or (PicMap.Top + Y - PicMapMoveXY.Y < -PicMap.Height + PicBack.Height - 1000) Then
' Exit Sub
Else
PicMap.Top = PicMap.Top + Y - PicMapMoveXY.Y
End If
If (PicMap.Left + X - PicMapMoveXY.X > 1000) Or (PicMap.Left + X - PicMapMoveXY.X < -PicMap.Width + PicBack.Width - 1000) Then
' Exit Sub
Else
PicMap.Left = PicMap.Left + X - PicMapMoveXY.X
End If
On Error Resume Next
VScroll.Value = -PicMap.Top
HScroll.Value = -PicMap.Left
End If
End Sub
Public Sub Toolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button.Key
Case "ANU"
Case "Refresh"
'''
ScrolResize
Case "Pan"
If Button.Value = tbrPressed Then
PicMap.MousePointer = 15
MoveFlg = True
Else
PicMap.MousePointer = 0
MoveFlg = False
End If
Case "Print"
End Select
End Sub
Private Sub VScroll_Change()
PicMap.Top = -VScroll.Value
End Sub
Private Sub HScroll_Change()
PicMap.Left = -HScroll.Value
End Sub