Solved

Tab Control Management

Posted on 2009-07-09
5
253 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 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
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 …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

733 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