Hello.
I'm using the following code to move borderless that contains an image as its title bar.
vb Code:
Private Sub ImgBanner_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.MousePointer = 15
Dim IX As Integer, IY As Integer
IX = X
IY = Y
End Sub
Private Sub ImgBanner_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
Me.Top = X - IY
Me.Left = X - IX
End If
End Sub
Private Sub ImgBanner_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.MousePointer = 0
End Sub
But, as the mouse is moved, the pointer goes to the top-left corner. I want it remain at same place where it was clicked.