I have the main form which has alot of code in the .cs file. I want to create a new .cs file but be able to use the textboxes and things like that in it. Is this posisble and how?
Printable View
I have the main form which has alot of code in the .cs file. I want to create a new .cs file but be able to use the textboxes and things like that in it. Is this posisble and how?
Yes, it is possible. As for the "how" question, you will need to be a bit more specific.
ok. So I got a textbox in Form1. Than I got Form1.cs that uses the textbox. But than I got main.cs (has no part in Form1 yet) that wants to use the textbox in Form1 but it can't.
See now cause this is hard to explain.
While possible through hacks, it's bad OO design. Try to put your actions into functions of Form1 and call these functions instead.
Echoing what nvoigt said.
WinForms applications should be completely OO. In fact that's one of the reasons I love WinForms. :)
alright yah I can work around it I guess.
thanks