Attribute VB_Name = "Module1"
Option Explicit

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long



Private Const WM_NCLBUTTONDOWN As Long = &HA1
Private Const HTCAPTION As Long = 2


Public Sub MoveObject(ByVal Object As PictureBox)
    ReleaseCapture
    SendMessage Object.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0
End Sub
