المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Access control freom different class



C# Programming
05-18-2009, 08:31 AM
Hi all.
I can not use my controls from another class file.
The scenario is:
I have 1 form "Form1" in which there have many controls like combobox, textbox, listbox.
I have added a class file "Class1.cs" where I have using all "System.windows" namespaces and "System.Data.SQLClient" also.
But in the class file when I want to access or manipulate the controls of that form, the controls shows the error
"The name does not exist in the current context".
where I have changed all modifier property of those controls "Public". Where is the problem?
If it i impossible then how can I solve it?
what else should I do?
please help me
Thanks in advance