forked from JiXiaomai/SMM2LevelViewer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathForm3.vb
24 lines (22 loc) · 755 Bytes
/
Form3.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Public Class Form3
Dim MX, MY As Integer, isMove As Boolean
Dim CX, CY As Integer
Private Sub P_MouseDown(sender As Object, e As MouseEventArgs) Handles P.MouseDown
MX = e.X
MY = e.Y
isMove = True
End Sub
Private Sub P_MouseUp(sender As Object, e As MouseEventArgs) Handles P.MouseUp
isMove = False
End Sub
Private Sub P_MouseMove(sender As Object, e As MouseEventArgs) Handles P.MouseMove
If isMove Then
P.Left += e.X - MX
P.Top += e.Y - MY
End If
CX = 1 + e.X \ 16
CY = 1 + e.Y \ 16
On Error Resume Next
Me.Text = CX.ToString & "," & CY.ToString & "=" & ObjLocData(1, CX, MapHeight(1) + 1 - CY)
End Sub
End Class