Solved

Visual Basic Multiple Forms Management

Posted on 2007-11-28
4
761 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
Comment Utility
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
Comment Utility
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
Comment Utility
correction use the VB application wizard instead of the VB entreprise editon controls
0
 
LVL 2

Expert Comment

by:andrewneely
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

728 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

11 Experts available now in Live!

Get 1:1 Help Now