C# newbie question #2

Hi.   I have a form with 5 different tab pages.  How do I define a separate class for each tab page in the tabcontrol?  All of the controls are initialized on the MainForm.  
suicehockey44Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

p_davisCommented:
what are you trying to accomplish --- i don't understand why you would need 5 classes, each representing a different tab page.
0
suicehockey44Author Commented:
Each tab page serves different function. For example one would be to enter and access Customer information, the other to Enter in new contracts, another one for reporting...etc.  I previously completed a project with the same Scope, but with different forms.  So, each form had its own buttons, boxes, charts, etc.  
0
suicehockey44Author Commented:
It just seems like it would be a large class for the One form with all of the controls and methods that need to be implemented.
0
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

p_davisCommented:
and you need these to be classes so you can reuse them in other places?

if so it should be easy enough

you need to make a class for each one and inherit from tabpage class. or you could, possibly, make each one a usercontrol, this would allow you a visual of how the design will look.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
p_davisCommented:
you can use partial classes -- still considered the same class but compartmentalized... if your only concern is size and disorder
0
suicehockey44Author Commented:
Perfect! User Control will work great. Thanks.
0
silemoneCommented:
to be honest if you want them to be so independent then this is truly an MDI app...anyway, you would just create the classes and on each tabpage, you would pass parameters to the class...so basically when you click over a specific tab, I think each tab has a load function and you can create an instance of the appropriate class at that time to access functions, etc...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.