Solved

About MDI forms

Posted on 2002-05-11
7
202 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
  • 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 

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

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

Join & Write a Comment

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…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
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…

744 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

16 Experts available now in Live!

Get 1:1 Help Now