Peter wrote:
I think if the object type of the control is not System.Windows.Forms.xxx,
then it is a user-defined control.
Probably, but not guaranteed. You can create user-defined controls in
the S.W.Forms namespace: ;-)
Namespace System.Windows.Forms
Class GoButton
Inherits Button
But how to tell the type of the user-defined control:
Composite(User), Extended, and Custom?
Ask the control what Type it is!
Dim ctl As Control = ...
If TypeOf ctl Is Extended Then
With DirectCast( ctl, Extended )
. . .
End With
ElseIf Typeof ctl Is Custom Then
. . .
End If
HTH,
Phill W.