Solved

Visual Basic Multiple Forms Management

Posted on 2007-11-28
4
776 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Suggested Courses
Course of the Month8 days, 16 hours left to enroll

615 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