Hi Bob,
You can query the Form's Type using Reflection.
Have a play with this:
<code>
Public Sub WhatsInAForm (oFormType As Type)
Dim aF() As FieldInfo
Dim aM() As MemberInfo
Dim Bf As BindingFlags = _
BindingFlags.Instance Or _
BindingFlags.NonPublic Or _
BindingFlags.DeclaredOnly
aF = GetType (oFormType).GetFields (Bf)
Console.WriteLine ("Fields")
For I = 0 To aF.Length - 1
Console.WriteLine ("I = {0} = {1}", I, aF(I).Name)
Next
aM = GetType (oFormType).GetMembers (Bf)
Console.WriteLine ("Members")
For I = 0 To aM.Length - 1
Console.WriteLine ("I = {0} = {1}", I, aM(I).Name)
Next
End Sub
</code>
The BindingFlags are
BF.Instance - Make a FormX to examine.
BF.NonPublic - Controls are Friend, ie. not Public
BF.DeclaredOnly - Skip all the base class stuff.
Regards,
Fergus