Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Tab Control Management

Posted on 2009-07-09
5
Medium Priority
?
258 Views
Last Modified: 2012-05-07
Hi,

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.
0
Comment
Question by:emi_sastra
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 14

Expert Comment

by:shahprabal
ID: 24815716
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.
http://www.java2s.com/Tutorial/VB/0260__GUI/TabControlandTabPages.htm 
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 24815848
Hi shahprabal,

Ok.

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.
0
 
LVL 14

Accepted Solution

by:
shahprabal earned 2000 total points
ID: 24816041
This is how you will open any of the tab controls programatically:
http://msdn.microsoft.com/en-us/library/system.windows.forms.tabcontrol.selectedindex.aspx
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.
 
 
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 24816312
Ok.

Thank you very much for your help.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question