Search code examples
c#visual-studio-2010class-library

Accessing windows applications controls from class library c# windows application



i wanted to disable form control from class library, means i added one class named as clsInit method & i called this method when i'm loading the form in main project,so i need find the control which one i wanted to disable.
Is it possible to find loaded form controls in class library?


Solution

  • Form.Controls property is what you need.

    You can pass the reference of your form into your library, and access its controls via Controls property.