A
Andreas
Hello
I have a problem with the visibility of private controls in my
UserControl.
My UserControl contains a private PictureBox and a private Label.
When I put my UserControl on a form and get all controls of the form
with:
....
Dim myControls As ArrayList
myControls = AllControls(Me)
....
Public Function AllControls(ByVal frm As Form) As ArrayList
Dim colControls As New ArrayList
AddContainerControls(frm, colControls)
Return colControls
End Function
Private Sub AddContainerControls(ByVal ctlContainer As Control,
ByVal colControls As ArrayList)
Dim ctl As Control
For Each ctl In ctlContainer.Controls
colControls.Add(ctl)
AddContainerControls(ctl, colControls)
Next
End Sub
ther is also the PictureBox and the Label from my UserControl and also
my UserControl in myControls.
Has anybody an idea how can get only my UserControl without the
PictureBox and the Label?
Thanks
I have a problem with the visibility of private controls in my
UserControl.
My UserControl contains a private PictureBox and a private Label.
When I put my UserControl on a form and get all controls of the form
with:
....
Dim myControls As ArrayList
myControls = AllControls(Me)
....
Public Function AllControls(ByVal frm As Form) As ArrayList
Dim colControls As New ArrayList
AddContainerControls(frm, colControls)
Return colControls
End Function
Private Sub AddContainerControls(ByVal ctlContainer As Control,
ByVal colControls As ArrayList)
Dim ctl As Control
For Each ctl In ctlContainer.Controls
colControls.Add(ctl)
AddContainerControls(ctl, colControls)
Next
End Sub
ther is also the PictureBox and the Label from my UserControl and also
my UserControl in myControls.
Has anybody an idea how can get only my UserControl without the
PictureBox and the Label?
Thanks