Solved

About MDI forms

Posted on 2002-05-11
7
206 Views
Last Modified: 2010-05-02
Hi ,
please i want to ceare a project ACCOUNTING SYSTEM AND I WANT TO CREATE IT USING mdi FORMS SO PLEASE I NEED TO KNOW HOW TO DEAL WITH MDI FORMS (HOW TO OPEN . CLOSE AND SO ON )

THANX ALOT
LOAY
0
Comment
Question by:loay
[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
  • 4
  • 2
7 Comments
 
LVL 12

Accepted Solution

by:
roverm earned 50 total points
ID: 7003035
With MDI Forms you've got 1 "main" form and (a lot of) child forms.

Open a new project, you will have Form1.
Add a new form: select the MDIForm here.

Set the startup form in the project to MDIForm1.

Since you cannot place command buttons directly on a MDIForm you need to build a menu (there are ways to put buttons on it, but only via a picture box, toolbars etc).

Save the project, close VB, then open MDIForm1 with notepad and copy the following code, replacing the former code:

VERSION 5.00
Begin VB.MDIForm MDIForm1
   BackColor       =   &H8000000C&
   Caption         =   "MDIForm1"
   ClientHeight    =   3195
   ClientLeft      =   165
   ClientTop       =   735
   ClientWidth     =   4680
   LinkTopic       =   "MDIForm1"
   StartUpPosition =   3  'Windows Default
   Begin VB.Menu mniFile
      Caption         =   "File"
      Begin VB.Menu mnuShow
         Caption         =   "Show Form1"
      End
      Begin VB.Menu mnuExit
         Caption         =   "Exit"
      End
   End
End
Attribute VB_Name = "MDIForm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub mnuExit_Click()
    End
End Sub

Private Sub mnuShow_Click()
    Form1.Show
End Sub

Then save it, reopen the project. You will see a menu in MDIForm1 with 2 options: Show Form1 and Exit.

Run the project and click "Show Form1".
You will see that Form1 will be shown, but NOT in the MDI form.
Close Form1, close MDIForm1.

Now the the MDIChild property of Form1 to True.
Now run the project again, select "Show Form1", you will see that Form1 is now a child of MDIForm1.

Keep in mind that a MDIChild cannot be shown modally.

D'Mzzl!
RoverM
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7017747
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101, Netminder or Mindphaser will return to finalize these if they are still open in 7 days.  Experts, please post closing recommendations before that time.

Below are your open questions as of today.  Questions which have been inactive for 21 days or longer are considered to be abandoned and for those, your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> YOU CANNOT DELETE A QUESTION with comments; special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click this link for Help Desk, Guidelines/Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and please keep them updated. If you are a KnowledgePro user, use the Power Search option to find them.  

Questions which are LOCKED with a Proposed Answer but do not help you, should be rejected with comments added.  When you grade the question less than an A, please comment as to why.  This helps all involved, as well as others who may access this item in the future.  PLEASE DO NOT AWARD POINTS TO ME.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20294532.html
http://www.experts-exchange.com/questions/Q.20268346.html
http://www.experts-exchange.com/questions/Q.20289804.html
http://www.experts-exchange.com/questions/Q.20289920.html
http://www.experts-exchange.com/questions/Q.20294533.html
http://www.experts-exchange.com/questions/Q.20172521.html
http://www.experts-exchange.com/questions/Q.20299473.html

To view your locked questions, please click the following link(s) and evaluate the proposed answer.
http://www.experts-exchange.com/questions/Q.20218591.html

*****  E X P E R T S    P L E A S E  ******  Leave your closing recommendations.
If you are interested in the cleanup effort, please click this link
http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643 
POINTS FOR EXPERTS awaiting comments are listed in the link below
http://www.experts-exchange.com/commspt/Q.20277028.html
 
Moderators will finalize this question if in @7 days Asker has not responded.  This will be moved to the PAQ (Previously Asked Questions) at zero points, deleted or awarded.
 
Thanks everyone.
Moondancer
Moderator @ Experts Exchange
0
 
LVL 12

Expert Comment

by:roverm
ID: 7018061
loay:
Thanks for closing, but why a B-grade ?
Did you need any further information ? Didn't my example show it all ?

D'Mzzl!
RoverM
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

Author Comment

by:loay
ID: 7018075
sorry really sorry i didnt mean it u answer was greate but i made a mistake .... hope to be friends
thanx alot a gain
0
 
LVL 12

Expert Comment

by:roverm
ID: 7019747
Sure no problem! But if you wanted to grade it with an 'A' then that's no problem either, we can ask a moderator to change the grade.
Just leave a comment if this is what you want.

D'Mzzl!
RoverM
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7022696
Thanks for returning and finalizing this, loay.

Based upon your comments, and specifically this:
loay  Date: 05/18/2002 02:36AM PST  
"sorry really sorry i didnt mean it u answer was greate" but i made a mistake .... hope to be friends
thanx alot a gain

This clearly shows that an "A" grade should have been assigned versus a "B" grade, so I have corrected this for you.

Moondancer - EE Moderator
0
 
LVL 12

Expert Comment

by:roverm
ID: 7024024
Thanks Moondancer!

D'Mzzl!
RoverM
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

737 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