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?
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.
To code is divine
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.
hth
-nv
She was so Blonde, she spent 20 minutes looking at the orange juice can because it said "Concentrate."
When in doubt, read the FAQ.
Then ask a smart question.
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