Huzefa Katwarawala

Hi guys,
I am having a problem in my application..the prob is that i wanna get the list
of controls on the other form...so what i have done is that
1> I have instantiate the form of which i wanna get the Control list
2> Recurse through a foreach loop and get each control and put the details in a XML file..

Now the main prob that is arising is that the controls are comin i the form in any order(ie textbox,button,textbox etc) and i want to recurse in the order of top to bottom and left to right(ie first label then textbox then again a label and then textbox and so on).

the i have implemented is

Code: ( text )
<code>
  1. Form2 frm = new Form2();
  2. foreach (System.Windows.Forms.Control ctr in frm.Controls)
  3. {
  4. .....//some codes here
  5. }
</code>
if anyone can help plz reply and for further clarification do reply....



Re: XML and the .NET Framework Get the list of Controls in the windows application

Dimitre_Novatchev - MSFT

This post has nothing to do with the topic of this forum: "XML and .NET".

Please, find a more appropriate forum.

Cheers,

Dimitre Novatchev