Use the SetParent API.
Code:Private Declare Function SetParent Lib "user32" Alias "SetParent" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long Private Sub Command1_Click() SetParent Picture1.hWnd, Picture2.hWnd End Sub
The window is usually in the same relitive position as it was before (if it was in the top left corner of the form it'll be in the top left of picture 2, the coords will be the same which means it's usually off the bottom right corner




Reply With Quote