Solved

Visual Basic Multiple Forms Management

Posted on 2007-11-28
4
770 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
[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
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

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…
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.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

751 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