타이틀바 없는 폼 이동하기
VNote
2017.06.28 16:09:47
*: Private MousePointMove As Point
Private Sub Form1_MouseDown(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown
If (e.Button And MouseButtons.Left) = MouseButtons.Left Then
MousePointMove = New Point(e.X, e.Y)
End If
End Sub
Private Sub Form1_MouseMove(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
If (e.Button And MouseButtons.Left) = MouseButtons.Left Then
Me.Left += e.X - MousePointMove.X
Me.Top += e.Y - MousePointMove.Y
End If
End Sub