-
usercontrol problems
I have a usercontrol that has picture boxes on it. The usercontrol has the property ControlContainer set to true. I want to be able to (just like on a form) drop a control on a picturebox in the usercontrol, and have that picturebox contain the control. not the usercontrol. This is so I can hide the picturebox and any controls contained within it all get hidden to.
Ive seen this capability in many other active X controls (able to drop controls onto the activex, and have the control be contained by a container within the control instead of the usercontrol itself.
Im thinking that this might mean me having to implement the ISimpleFrame interface myself. Just dont know what to do.
Gregg
-
I've only written two UserControls so I may not be the best person to answer this question. My first thought was the SetParent API
Declare Function SetParent Lib "user32" Alias "SetParent" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Call SetParent(Child.hWnd, Parent.hWnd)
Greg