> With the GroupBox, using reflection you could get it's designer and see
> that it derives from ParentControlDesigner giving it's 'container' like
> behaviour. The designer for Form and panel also derive from
> ParentControlDesigner.
I'm not using any of the MS designer objects right now. Last I checked
the model would not for a component design. This is a drop on the form
component, and provides a advanced end-user designer.
The following code seems to be working for me.
anyway,
Thanks everyone for the help, was a bit stump on the container thing..
Schneider
This is working for me thanks to (Claes Bergfall):
'------------------------------------------------------------
Call GetStyle(ContainerControl) on it. Since it's protected you'll have
to use reflection to do it. This should do it:
Private Overloads Function GetStyle(ByVal ctrl As Control, ByVal style As
ControlStyles) As Boolean
Dim flags As BindingFlags = BindingFlags.NonPublic Or
BindingFlags.Instance
Dim types() As Type = {GetType(ControlStyles)}
Dim methodInfo As MethodInfo
methodInfo = ctrl.GetType.GetMethod("GetStyle", flags, Nothing, types,
Nothing)
If methodInfo Is Nothing Then
Throw New MissingMemberException
Else
Return CBool(methodInfo.Invoke(ctrl, New Object() {style}))
End If
End Function
/claes