usercontrol name:MyOcx.ctl
Controlcontainer=true
my code is err:
Controlcontainer=true
my code is err:
Code:
Private Sub UserControl_Show()
Dim obj As Control
Dim ID As Long
For Each obj In UserControl.Parent
If obj.Container = Me Then
ID = ID + 1
' Debug.Print " UserControl.hwnd=" & UserControl.hwnd & ",子控件:" & ID & ",Name=" & obj.Name
'
End If
Next
End Sub