1 Multiple Document Interface (MDI) Windows. Single Document Interface (SDI) A program that can only support one open window or a document For Example,

Slides:



Advertisements
Similar presentations
14-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
Advertisements

 2006 Pearson Education, Inc. All rights reserved Graphical User Interface Concepts: Part 2.
Practical Programming COMP153-08S Lecture: Repetition Continued.
Chapter 14 Additional Topics in Visual Basic Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
 2002 Prentice Hall. All rights reserved. 1 Chapter 13 – Graphical User Interfaces: Part 2 Outline 13.1Introduction 13.2 Menus 13.3 LinkLabel s 13.4 ListBox.
 2007 Dr. Natheer Khasawneh. All rights reserved. 1 Chapter 14 – Graphical User Interfaces Part 2 Outline 14.9 TreeViews ListViews TabControl.
Compunet Corporation Programming with Visual Studio.NET GUI Week 13 Tariq Aziz and Kevin Jones.
Visual Studio 2005 Using the DataGridView Control V. Matos Cleveland State University.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 7- 1.
Multiple-Document-Interface (MDI) Windows MDI programs enable users to edit multiple documents at once. MDI programs enable users to edit multiple documents.
Graphical User Interface (GUI) A GUI allows user to interact with a program visually. GUIs are built from GUI components. A GUI component is an object.
MDI windows Single-document-interface (SDI)
Multiple Forms & Procedures. Form Methods: –Show, Hide, Activate, Close Events: –Load, Activated, Closing, Closed.
Multiple Document Interface (MDI) application
Introduction to ADO.Net, VB.Net Database Tools and Data Binding ISYS 512.
GUI Concepts - 3. Menus Creating Other Forms Visual Inheritance Outline.
Creating Menu. Objectives Create a menu system for a form –Create a menu –Create a menu titles –Create a menu items –Create a submenu –Modify menu –Edit.
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
Neal Stublen Practice Solution  Create a new solution  Add a WinForms project  Add a Class Library project  Reference the library.
Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project.
McGraw-Hill© 2007 The McGraw-Hill Companies, Inc. All rights reserved. 1-1.
1 Graphical User Interfaces Part 2 Outline Multiple Document Interface (MDI) Windows Visual Inheritance User-Defined Controls.
Microsoft Visual Basic 2012 Using Procedures and Exception Handling CHAPTER SEVEN.
Microsoft Visual Basic 2008 CHAPTER 8 Using Procedures and Exception Handling.
Multiple Forms, Standard Modules, And Menus
CSCI 3327 Visual Basic Chapter 10: Windows Forms GUI: A Deeper Look UTPA – Fall 2011.
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
Menus,MonthCalender, DateTimePicker, MDI,Tree View, List View,
MDI vs. SDI MDI – Multiple Document Interface SDI – Single Document Interface In an SDI application, each form acts independently of the others. A MDI.
Tutorial 1: An Introduction to Visual Basic.NET1 Tutorial 1 An Introduction to Visual Basic.NET.
Menus,MonthCalender, DateTimePicker, MDI,Tree View, List View,
Lập trình trên Windows với Microsoft®.NET Giảng viên : Hồ Hoàn Kiếm.
Microsoft Word 2000 Presentation 5. Major Word Topics Columns Tables Lists.
Clearly Visual Basic: Programming with Visual Basic 2008 Chapter 4 I Need a Tour Guide.
Chapter 5 Menus, Common Dialog Boxes, and Methods Programming in C#.NET © 2003 by The McGraw-Hill Companies, Inc. All rights reserved.
CST238 Week 4 Questions / Concerns? Announcements – Start thinking about project ideas – Test#1 next Monday, 4/28/14 Recap Check-off Take Home Lab#3 New.
VB Procedures. Procedures. Sub procedure: Private/Public Sub SubName(Arguments) … End Sub Private: Can only be accessed by procedures in the same form.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. Chapter 13 – Graphical User Interfaces Part 2 Outline.
Graphical User Interface Concepts - Part 2 Session 09 Mata kuliah: M0874 – Programming II Tahun: 2010.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Introduction to Visual Basic.NET Your First Visual Basic.NET Application.
VB.NET Additional Topics
 2002 Prentice Hall. All rights reserved. 1 Chapter 13 – Graphical User Interfaces: Part 2 Outline 13.1Introduction 13.2 Menus 13.3 LinkLabel s 13.4 ListBox.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
Visual C# 2012 How to Program © by Pearson Education, Inc. All Rights Reserved.
3.2 VB.NET Events An Event Procedure Properties and Event Procedures of the Form Tab Order of Controls Exercises.
PowerBuilder Online Courses - by Prasad Bodepudi MDI Applications Single Document Interface Multiple Document Interface.
CONTROL STATEMENTS. A conditional expression uses a comparison operator which results in true or false value. If the comparision is valid it results in.
Chapter 13 – GUI: Part Introduction 13.2 Menus 13.3 LinkLabel s 13.4 ListBox es and CheckedListBox es ListBoxes CheckedListBoxes.
6b – Sub Procedure With Parameters Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
Creating Menus Menu Bar – behaves like standard Windows menus Can be used in place of or in addition to buttons to execute a procedure Menu items are controls.
CECS 5020 Computers in Education Forms and Menus.
Introduction to VB programming Dr. John P. Abraham UTPA Chapters 2 & 3.
Chapter 7 Multiple Forms, Modules, and Menus. Section 7.2 MODULES A module contains code—declarations and procedures—that are used by other files in a.
COMPUTER PROGRAMMING I Apply Procedures to Develop List Box and Combo Box Objects.
Chapter 1: An Introduction to Visual Basic .NET
Graphical User Interface
SDI & MDI SDI -> Single Document Interface
Apply Procedures to Develop Menus, List Box and Combo Box Objects
Apply Procedures to Develop Message, Input, and Dialog Boxes
Apply Procedures to Develop Menus, List Box and Combo Box Objects
Introduction to VB programming
للمزيد زورونا على موقعنا الإلكتروني:
Windows Forms GUI: A Deeper Look
Multiple Document Interface (MDI)
Chapter 13 Additional Topics in Visual Basic
Overview of the IDE Visual Studio .NET is Microsoft’s Integrated Development Environment (IDE) for creating, running and debugging programs (also.
GUI Programming in Visual Studio .NET
Presentation transcript:

1 Multiple Document Interface (MDI) Windows

Single Document Interface (SDI) A program that can only support one open window or a document For Example, paint and Notepad are SDI’s MDI programs enable users to edit multiple documents at once. For example, Photoshop and Adobe Acrobat Reader are MDI’s Multiple Document Interface (MDI) Windows

Single Document Interface (SDI) Multiple Document Interface (MDI)

Cont. The application window of an MDI program is called the parent window. Each window inside the application is referred to as a child window.

Cont … MDI – Allows multiple windows Parent window – Application window – Can have many child windows Child window – Cannot be parent – Has exactly one parent – Cannot be moved outside parent – Functionality can be different than other child windows from same parent

Cont.

How to create and MDI form? To create and MDI form, create a new form and set its IsMDIContainer property to True. The form will then change appearance

How to create a child? Next, create a child form class to be added to the form. To do this, right-click the project in the Solution Explorer, select Add Windows Form... and name the file.

Cont. To add the child form to the parent, we must create a new child form object, set its MDIParent property to the parent form and call method Show: Dim frmChild As New ChildFormClass() frmChild.MdiParent = frmParent frmChild.Show()

Cont. Child windows can be minimized, maximized and closed independently of each other and of the parent window. When the parent is minimized or closed, the child windows are minimized or closed as well.

Multiple Document Interface (MDI) Windows

MdiList Property VB.NET provides a property that facilitates the tracking of which child windows are opened in an MDI container. Property MdiList (a Boolean) of class Menu- Item determines whether a MenuItem displays a list of open child windows. The list appears at the bottom of the menu following a separator bar

When a new child window is opened, an entry is added to the list. If nine or more child windows are open, the list includes the option More Windows..., which allows the user to select a window from a list, using a scrollbar. Multiple MenuItems can have their MdiList property set; each displays a list of open child windows. MdiList Property

LayoutMdi Property MDI containers allow developers to organize the placement of child windows. The child windows in an MDI application can be arranged by calling method LayoutMdi of the parent form. Method LayoutMdi takes a LayoutMdi enumeration, which can have values ArrangeIcons, Cascade, TileHorizontal and TileVertical.

1 ' Fig : UsingMDI.vb 2 ' Demonstrating use of MDI parent and child windows. 3 4Public Class FrmUsingMDI 5Private childWindow as FrmChild 6 ' create Child1 when menu clicked 7 Private Sub mnuitmChild1_Click( _ 8 ByVal sender As System.Object, _ 9 ByVal e As System.EventArgs) Handles mnuitmChild1.Click ' create image path 12 Dim imagePath As String = _ 13 Directory.GetCurrentDirectory() & "\images\image0.jpg" ' create new child 16 childWindow = New FrmChild(imagePath, "Child1") 17 childWindow.MdiParent = Me ' set parent 18 childWindow.Show() ' display child 19 End Sub ' mnuitmChild1_Click ' create Child2 when menu clicked 22 Private Sub mnuitmChild2_Click( _ 23 ByVal sender As System.Object, _ 24 ByVal e As System.EventArgs) Handles mnuitmChild2.Click

25 ' create image path 26 Dim imagePath As String = _ 27 Directory.GetCurrentDirectory() & "\images\image1.jpg" ' create new child 30 childWindow = New FrmChild(imagePath, "Child2") 31 childWindow.MdiParent = Me ' set parent 32 childWindow.Show() ' display child 33 End Sub ' mnuitmChild2_Click ' create Child3 when menu clicked 36 Private Sub mnuitmChild3_Click( _ 37 ByVal sender As System.Object, _ 38 ByVal e As System.EventArgs) Handles mnuitmChild3.Click ' create image path 41 Dim imagePath As String = _ 42 Directory.GetCurrentDirectory() & "\images\image2.jpg" 43 ' create new child 44 childWindow = New FrmChild(imagePath, "Child3") 45 childWindow.MdiParent = Me ' set parent 46 childWindow.Show() ' display child 47 End Sub ' mnuitmChild3_Click

48 ' exit application 49 Private Sub mnuitmExit_Click(ByVal sender As System.Object, _ 50 ByVal e As System.EventArgs) Handles mnuitmExit.Click Application.Exit() 53 End Sub ' mnuitmExit_Click ' set cascade layout 55 Private Sub mnuitmCascade_Click(ByVal sender As System.Object, _ 56 ByVal e As System.EventArgs) Handles mnuitmCascade.Click Me.LayoutMdi(MdiLayout.Cascade) 59 End Sub ' mnuitmCascade_Click ' set TileHorizontal layout 62 Private Sub mnuitmTileHorizontal_Click( _ 63 ByVal sender As System.Object, ByVal e As System.EventArgs) _ 64 Handles mnuitmTileHorizontal.Click Me.LayoutMdi(MdiLayout.TileHorizontal) 67 End Sub ' mnuitmTileHorizontal_Click Method LayoutMdi can take values ArrangeIcons, Cascade, TileHorizontal and TileVertical

68 ' set TileVertical layout 69 Private Sub mnuitmTileVertical_Click( _ 70 ByVal sender As System.Object, _ 71 ByVal e As System.EventArgs) Handles mnuitmTileVertical.Click Me.LayoutMdi(MdiLayout.TileVertical) 74 End Sub ' mnuitmTileVertical_Click End Class ' FrmUsingMDI

Multiple Document Interface (MDI) Windows Demo