Solved

Multiple Forms

Posted on 2002-06-04
8
193 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
vba find the last empty column 10 89
VBA color chart bars 12 79
vb6 connector to mongodb 2 53
VB6 ListBox Question 4 34
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…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
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…

861 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

24 Experts available now in Live!

Get 1:1 Help Now