home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / ch_code / ch09 / mdidemo2 / mdidemo2.frm (.txt) next >
Encoding:
Visual Basic Form  |  1997-02-20  |  2.1 KB  |  73 lines

  1. VERSION 5.00
  2. Begin VB.MDIForm MDIForm1 
  3.    AutoShowChildren=   0   'False
  4.    BackColor       =   &H8000000C&
  5.    Caption         =   "MDIDemo2"
  6.    ClientHeight    =   4815
  7.    ClientLeft      =   165
  8.    ClientTop       =   735
  9.    ClientWidth     =   8160
  10.    LinkTopic       =   "MDIForm1"
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.Menu Forms 
  13.       Caption         =   "Child Forms"
  14.       Begin VB.Menu FormOpen 
  15.          Caption         =   "Open Forms"
  16.       End
  17.       Begin VB.Menu FormsClose 
  18.          Caption         =   "Close Forms"
  19.       End
  20.    End
  21.    Begin VB.Menu WindowMenu 
  22.       Caption         =   "Window"
  23.       WindowList      =   -1  'True
  24.       Begin VB.Menu WindowCascade 
  25.          Caption         =   "Cascade"
  26.       End
  27.       Begin VB.Menu WindowTileH 
  28.          Caption         =   "Tile Horizontally"
  29.       End
  30.       Begin VB.Menu WindowTileV 
  31.          Caption         =   "Tile Vertically"
  32.       End
  33.       Begin VB.Menu WindowArrange 
  34.          Caption         =   "Arragnge Icons"
  35.       End
  36.    End
  37. Attribute VB_Name = "MDIForm1"
  38. Attribute VB_GlobalNameSpace = False
  39. Attribute VB_Creatable = False
  40. Attribute VB_PredeclaredId = True
  41. Attribute VB_Exposed = False
  42. Option Explicit
  43. Dim DocumentForms(10) As New ChildForm
  44. Private Sub FormsClose_Click()
  45. Dim i As Integer
  46.     For i = 0 To 9
  47.         Unload DocumentForms(i)
  48.     Next
  49. End Sub
  50. Private Sub FormOpen_Click()
  51. Dim i As Integer
  52.     For i = 0 To 9
  53.         DocumentForms(i).Show
  54.         DocumentForms(i).BackColor = QBColor(Rnd * 14 + 1)
  55.         DocumentForms(i).Caption = "Document " & Format(i)
  56.         DocumentForms(i).Tag = i
  57.     Next
  58. End Sub
  59. Private Sub ShowActive_Click()
  60. End Sub
  61. Private Sub WindowArrange_Click()
  62.     MDIForm1.Arrange vbArrangeIcons
  63. End Sub
  64. Private Sub WindowCascade_Click()
  65.     MDIForm1.Arrange vbCascade
  66. End Sub
  67. Private Sub WindowTileH_Click()
  68.     MDIForm1.Arrange vbTileHorizontal
  69. End Sub
  70. Private Sub WindowTileV_Click()
  71.     MDIForm1.Arrange vbTileVertical
  72. End Sub
  73.