DotNetWebTutor.com                                                    Link to Us

Multiple Document Interface (MDI)

VB MDI - Multiple Documenu Interface
MDI-Multiple Document Interface
Has a single parent form containing one or more inner forms
MDI Example
Example:
  • Start a new project
  • Change form property isMidContainer to true

isMDIContainer equals true
This lets you have child windows within it

  • Drop a button on the form (normally you use a menu)
  • Change the text to Add Form
  • right-click on the project in solution explorer and add a new form
  • Call it child.vb
  • Go back to MDI form
  • Double click button

Dim frmChild as new child()
frmChild.mdiparent=me
frmchild.show()

  • run it

 

the form is inside the parent form
you can drag it around but only inside the parent window

forms have a layoutMDI method that takes an enum
an enum is basically a list of possibilities

  1. mdilayout.arrangeicons
  2. mdilayout.cascade
  3. mdilayout.tilehorizontal
  4. mdilayout.tilevertical
  • add two buttons
  • name them btncascade and btntile
  • change the text to Cascade and Tile

MDIButtons

  • add this to btncascade

me.layoutmdi(mdilayout.cascade)

  • add this to the btntile

me.layoutmdi(mdilayout.tilehorizontal)
mdilayout.tilehorizontal

MDI