-
Hi, Does anyone know the alternative way to do something same with the Container properties like:
Code:
Set Picture1.Container = Picture2
because currently, I developing a application that run under WinCE 2.11 platform which does not support this properties.
Thanks for all your feedback. :)
-
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