Solved

Tab Control Management

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

746 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

13 Experts available now in Live!

Get 1:1 Help Now