Solved

Tab Control Management

Posted on 2009-07-09
5
248 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
  • 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 14

Expert Comment

by:shahprabal
ID: 24815771
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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

919 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now