Tab Control Management


I want to use tab control for data entry.
There are many Tabpage is used.

How to code it that make it easy to write code and maintenance?

Thank you.
Who is Participating?
shahprabalConnect With a Mentor Commented:
This is how you will open any of the tab controls programatically:
TabPage is an object... so should add regions to the page the tab control is on.
How you organize it is upto you. You can have a region for each tab's code. You can also have separate regions for similar methods/events for each tab (eg load data).
Like you suggested you can also create a separate class that contains each tab page and code related to it. How much code you have and what part will most likely be modified is what you need to consider before picking an option.
This has a tutorial on TabControl and TabPages. I don't have suggestions on code maintainance... but you will probably need to get the program working and then refactor the code a little. 
emi_sastraAuthor Commented:
Hi shahprabal,


How to separate code from one tab to another tab, to make it easy to maintain?
For example for every tab we usually have:

1. Open Table.
2. Fill to Control.
3. Save
4. Delete.
5. etc.

Should we separate it into different class or others?
Or just put it all into the form itself?

Thank you.
emi_sastraAuthor Commented:

Thank you very much for your help.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.