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 (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-08-14  |  1.8 KB  |  65 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. Attribute VB_Name = "mdiApplication"
  34. Attribute VB_Creatable = False
  35. Attribute VB_Exposed = False
  36. Option Explicit
  37. Private Sub MDIForm_Unload(Cancel As Integer)
  38.     ' You need to explicitly end here, or
  39.     ' application will not end during debugging.
  40.     End
  41. End Sub
  42. Private Sub mnuAdd_Click()
  43.     Dim Window As New Window
  44.     Window.Create
  45. End Sub
  46. Private Sub smnuAdd_Click()
  47.     Windows.Add
  48. End Sub
  49. Private Sub mnuArrange_Click()
  50.     Windows.Arrange 1
  51. End Sub
  52. Private Sub mnuDelete_Click()
  53.     Windows.Remove Application.ActiveWindow.Index
  54. End Sub
  55. Private Sub mnuDialog_Click()
  56.     Dim dlgNew As New Dialog
  57.     ' If there's no active window.
  58.     If TypeName(Application.ActiveWindow) = "Nothing" Then
  59.         ' Add a window.
  60.         mnuAdd_Click
  61.     End If
  62.     ' Create a child window (dialog).
  63.     dlgNew.Create Application.ActiveWindow
  64. End Sub
  65.