Code:
Option Explicit
Dim xx As Single, yy As Single
Private Sub Picture1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
DoMouseDown Button, X, Y
End Sub
Private Sub Picture1_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
DoMove "Picture1", Button, X, Y
End Sub
Private Sub Picture2_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
DoMouseDown Button, X, Y
End Sub
Private Sub Picture2_MouseMove(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
DoMove "Picture2", Button, X, Y
End Sub
Sub DoMouseDown(Button As Integer, X As Single, Y As Single)
If Button = 1 Then
xx = X
yy = Y
End If
End Sub
Sub DoMove(GroupName As String, Button As Integer, X As Single, Y As Single)
If Button = 1 Then
Dim ControlArr As Object, Pic As Object
Select Case GroupName
Case "Picture1"
Set ControlArr = Picture1
Case "Picture2"
Set ControlArr = Picture2
End Select
For Each Pic In ControlArr
Pic.Left = Pic.Left + X - xx
Pic.Top = Pic.Top + Y - yy
Next
End If
End Sub
How to Render multiple images into one AlphaImage control-VBForums
https://www.vbforums.com/showthread....aImage-control