Solved

Multiple Forms

Posted on 2002-06-04
8
192 Views
Last Modified: 2010-05-02
I am new the the VB Development Envirment and I a looking for information on developing an application that will allow me to encompass multiple forms in a single form....

Any help to assist me with the baby steps would be much appreciated......

Thanks,
Jeff
0
Comment
Question by:jeffbeasley
  • 2
  • 2
  • 2
  • +2
8 Comments
 

Expert Comment

by:dogtired
ID: 7054697
Look up the Tab object and/or using sub-forms in Help.
0
 
LVL 1

Expert Comment

by:Toad224
ID: 7054699
I suppose you're talking about a multiple document interface.  Add a MDI form to your project by choosing MDI form in the Project menu.  All other regular forms you create that you want inside of the MDI form, set their MDI Child property to true.  Instead of starting up with Form1, you'd want to start with the MDI form.  Go to Project > Project Properties > Startup Object, and change that to the MDI form.  When the MDI form loads, you can show it's children window by doing something like Form1.Show  .  As long as the children window have the property MDI Child set to true, they should show in the MDI Form.

Good Luck!
0
 
LVL 3

Author Comment

by:jeffbeasley
ID: 7054741
Toad224,
Thanks for the info on the MDI Forms,  How dow I transport all of my work that I put into Form1 menus to the new MDI form.

Jeff
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7054743
Both of the above ideas are good: MDI or tab control.

Another idea I used recently was to create a series of frames and allow the frames to be dragged around like windows within the form.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 3

Author Comment

by:jeffbeasley
ID: 7054751
What is the most effective and efficient way for developing multiple form interfaces... I read somwhere that Microsoft doesn't support MDI's or won't in the future......(increase points to 75)

Jeff
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 7054756
I suppose it really depends on your expectations of the application.

If you simply want to create an application that has many forms, just create those forms and have them appear as needed.

If you want to create an application that allows users to open multiple sessions of the same workarea, then you'll need to create a form that can be instantiated (make an "instance" of it) separately from all others.  This is how controls work now, so extending the idea to a form should not be very difficult.

Since .net seems to be working on the object-oriented concept, I suspect that the new idea is to simply create a form class, and instantiate as many as you need.
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 7054767
learning
0
 
LVL 1

Accepted Solution

by:
Toad224 earned 75 total points
ID: 7054822
Transport all the work you put in your Form1 menus to the new MDI form?   If you tried doing the MDI form yet, you'll see that when Form 1 is active in the MDI window, the menus of Form 1 will appear at the top of the MDI form.  If you're really looking to copy it to the MDI form, you can open Form1.frm in notepad, look for the part where it says  Begin VB.Menu  , and insert all the menu data into MDIForm1.frm in the appropriate place.  This would probably be between the Begin VB.MDIForm MDIForm1  and End in the MDIForm1.frm.

Regarding the Microsoft not supporting MDI's in the future, if you're going to think to the future, you should use VB.net rather than VB6.  I don't think MDI interfaces will die anytime soon.  Many major applications still use MDI interfaces such as AOL, and there is still documentation on using MDI forms in VB.net - http://search.microsoft.com/gomsuri.asp?n=4&c=rp_Results&siteid=us/dev&target=http://msdn.microsoft.com/library/en-us/dndotnet/html/getstarwinform.asp

I hope this helps.  Good Luck!
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…

706 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

18 Experts available now in Live!

Get 1:1 Help Now