home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Programmer'…arterly (Limited Edition) / Visual_Basic_Programmers_Journal_VB-CD_Quarterly_Limited_Edition_1995.iso / code / ch19code / mdiwin.frm < prev    next >
Text File  |  1995-08-14  |  2KB  |  77 lines

  1. VERSION 4.00
  2. Begin VB.MDIForm mdiApplication 
  3.    BackColor       =   &H8000000C&
  4.    Caption         =   "MDIForm1"
  5.    ClientHeight    =   4236
  6.    ClientLeft      =   1008
  7.    ClientTop       =   1980
  8.    ClientWidth     =   6720
  9.    Height          =   4788
  10.    Left            =   960
  11.    LinkTopic       =   "frmContainer"
  12.    Top             =   1476
  13.    Width           =   6816
  14.    Begin VB.Menu mnuWindow 
  15.       Caption         =   "&Window"
  16.       WindowList      =   -1  'True
  17.       Begin VB.Menu mnuAdd 
  18.          Caption         =   "&Add"
  19.       End
  20.       Begin VB.Menu mnuDelete 
  21.          Caption         =   "&Delete"
  22.       End
  23.       Begin VB.Menu mnuArrange 
  24.          Caption         =   "A&rrange"
  25.       End
  26.       Begin VB.Menu sep 
  27.          Caption         =   "-"
  28.       End
  29.       Begin VB.Menu mnuDialog 
  30.          Caption         =   "&New Dialog"
  31.       End
  32.    End
  33. End
  34. Attribute VB_Name = "mdiApplication"
  35. Attribute VB_Creatable = False
  36. Attribute VB_Exposed = False
  37. Option Explicit
  38.  
  39.  
  40.  
  41. Private Sub MDIForm_Unload(Cancel As Integer)
  42.     ' You need to explicitly end here, or
  43.     ' application will not end during debugging.
  44.     End
  45. End Sub
  46.  
  47.  
  48. Private Sub mnuAdd_Click()
  49.     Dim Window As New Window
  50.     Window.Create
  51. End Sub
  52.  
  53. Private Sub smnuAdd_Click()
  54.     Windows.Add
  55. End Sub
  56.  
  57. Private Sub mnuArrange_Click()
  58.     Windows.Arrange 1
  59. End Sub
  60.  
  61. Private Sub mnuDelete_Click()
  62.     Windows.Remove Application.ActiveWindow.Index
  63. End Sub
  64.  
  65. Private Sub mnuDialog_Click()
  66.     Dim dlgNew As New Dialog
  67.     ' If there's no active window.
  68.     If TypeName(Application.ActiveWindow) = "Nothing" Then
  69.         ' Add a window.
  70.         mnuAdd_Click
  71.     End If
  72.     ' Create a child window (dialog).
  73.     dlgNew.Create Application.ActiveWindow
  74. End Sub
  75.  
  76.  
  77.