Regarding Retrieve Controls From a Form

subashbtechmba

Newcomer
Joined
Jun 25, 2009
Messages
3
Hi,
How to retrieve the winform controls from another Form?
For Example i have winForm named as sample1,in which i want to write code for to retrieve controls of another form named as Sample2?
Is It Possible?

How to use control.controlcollection.find(formname)?

Thanks
Subash
 
If they are in the same project then the easiest way is probably for the sample1 form to expose a method which returns a collection of all the controls on sample1 and call this method from sample2.
 
Back
Top