Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21843

[RESOLVED] Controls Collection ?

$
0
0
Is there a way to tell which controls are directly on the parent form and which are in a container using the Controls Collection?

I thought this would be simple but apparently I am missing something

If I do this
Code:

For Each ctl In Me.Controls
    Debug.Print ctl.Name
Next

It returns not only the controls on the form but also returns the controls inside the frame on the form and I need to differentiate between controls on the form and controls in a container.

This is simple in VB.Net but apparently works a bit different in VB6

Any pointers?

Viewing all articles
Browse latest Browse all 21843

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>