I am currently working in a small Windows Forms project in C # using Visual Studio 2008. I added my own class to the project, but in this class I cannot access form controls (for example, listbox, textbox, buttons) so that programmatically change their properties.
The class file uses the system.windows.forms file, and all the files are in the same namespace. Surprisingly, I also can’t access the controls in the form1 class itself, unless I create a method in the class and then intellisense displays the names of the various controls.
in a custom class, however intellisense does not display control names at all.
Appreciate if someone coudl sheds light on why this might happen.
thanks
source
share