Solved

Visual Basic Multiple Forms Management

Posted on 2007-11-28
4
764 Views
Last Modified: 2013-12-25
I am going to develop a large ERP-type application in VB6, and I need direction on how to handle multiple screens/forms.  I will have some sort of main menu and toolbars, and I want to create a screen area that will contain the forms as they are selected.  For example, with a program like Peachtree or Quickbooks, you have the main toolbars, and then as you select different operations, the work area changes accordingly.  I would like to be able to have multiple forms to be loaded at the same time, and when the user minimizes the main menu section, all the forms will minimize along with it.  Is it possible to achieve this with Visual Basic 6, and if so, can someone get me pointed in the right direction?
0
Comment
Question by:timnorrismis
  • 2
4 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 125 total points
ID: 20368918
It sounds as if you need to use an MDI form.

Add one using Project/Add MID form, and change the MDIChild property of any forms that you want to be shown inside the MDI form area to True.
0
 
LVL 10

Expert Comment

by:3_S
ID: 20369462
Instead of starting a standard exe project you could start with a new VB entreprise edition controls project.
This gives you a default MDI form and a wizard to add some default action in your menu.
0
 
LVL 10

Expert Comment

by:3_S
ID: 20369471
correction use the VB application wizard instead of the VB entreprise editon controls
0
 
LVL 2

Expert Comment

by:andrewneely
ID: 20382900
Some advice on coding large apps in VB6.  

Encapsulate as much as possible.  Never reference any control directly from another form (i.e. never do a form1.textbox1.text="stuff"  from form2)  becuase you might at some point redesign the form, and then you'd have to remember all places you directly referenced a control.  Instead, do property proceedures, so that you only access the form through known channels.  In dot net, I force this by making all controls private (meaning they can't be accessed from outside the form), but I've not found a way to do this in VB6.

This allows you to redo the form's internal construction without worrying how it affects any other forms.

Avoid Global variables as if they were the plauge.  Pass the data to and from the forms.  That way there is no doubt as to what is modifying what.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

776 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