home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 April / Chip_2001-04_cd1.bin / chplus / vb / vbkids20.exe / VBKids / VBKProjects / VB6Projects / Formfun.frm (.txt) < prev    next >
Visual Basic Form  |  2000-06-12  |  3KB  |  115 lines

  1. VERSION 5.00
  2. Begin VB.Form frmFormFun 
  3.    Caption         =   "Form Fun"
  4.    ClientHeight    =   2310
  5.    ClientLeft      =   3930
  6.    ClientTop       =   2895
  7.    ClientWidth     =   3810
  8.    LinkTopic       =   "Form1"
  9.    PaletteMode     =   1  'UseZOrder
  10.    ScaleHeight     =   2310
  11.    ScaleWidth      =   3810
  12.    Begin VB.CommandButton cmdShow 
  13.       Caption         =   "Show Buttons"
  14.       Height          =   495
  15.       Left            =   2040
  16.       TabIndex        =   5
  17.       Top             =   1440
  18.       Visible         =   0   'False
  19.       Width           =   1215
  20.    End
  21.    Begin VB.CommandButton cmdBlue 
  22.       Caption         =   "Blue Form"
  23.       Height          =   495
  24.       Left            =   2040
  25.       TabIndex        =   4
  26.       Top             =   840
  27.       Width           =   1215
  28.    End
  29.    Begin VB.CommandButton cmdRed 
  30.       Caption         =   "Red Form"
  31.       Height          =   495
  32.       Left            =   2040
  33.       TabIndex        =   3
  34.       Top             =   240
  35.       Width           =   1215
  36.    End
  37.    Begin VB.CommandButton cmdHide 
  38.       Caption         =   "Hide Buttons"
  39.       Height          =   495
  40.       Left            =   600
  41.       TabIndex        =   2
  42.       Top             =   1440
  43.       Width           =   1215
  44.    End
  45.    Begin VB.CommandButton cmdGrow 
  46.       Caption         =   "Grow Form"
  47.       Height          =   495
  48.       Left            =   600
  49.       TabIndex        =   1
  50.       Top             =   840
  51.       Width           =   1215
  52.    End
  53.    Begin VB.CommandButton cmdShrink 
  54.       Caption         =   "Shrink Form"
  55.       Height          =   495
  56.       Left            =   600
  57.       TabIndex        =   0
  58.       Top             =   240
  59.       Width           =   1215
  60.    End
  61. Attribute VB_Name = "frmFormFun"
  62. Attribute VB_GlobalNameSpace = False
  63. Attribute VB_Creatable = False
  64. Attribute VB_PredeclaredId = True
  65. Attribute VB_Exposed = False
  66. Private Sub cmdBlue_Click()
  67. 'Make form blue
  68. frmFormFun.BackColor = vbBlue
  69. End Sub
  70. Private Sub cmdGrow_Click()
  71. 'Grow the form
  72. 'Increase the form height by 100 twips
  73. frmFormFun.Height = frmFormFun.Height + 100
  74. 'Increase the form width by 100 twips
  75. frmFormFun.Width = frmFormFun.Width + 100
  76. End Sub
  77. Private Sub cmdHide_Click()
  78. 'Hide all buttons but cmdShow
  79. cmdGrow.Visible = False
  80. cmdShrink.Visible = False
  81. cmdHide.Visible = False
  82. cmdRed.Visible = False
  83. cmdBlue.Visible = False
  84. 'Show cmdShow button
  85. cmdShow.Visible = True
  86. End Sub
  87. Private Sub cmdRed_Click()
  88. 'Make form red
  89. frmFormFun.BackColor = vbRed
  90. End Sub
  91. Private Sub cmdShow_Click()
  92. 'Show all buttons but cmdShow
  93. cmdGrow.Visible = True
  94. cmdShrink.Visible = True
  95. cmdHide.Visible = True
  96. cmdRed.Visible = True
  97. cmdBlue.Visible = True
  98. 'Hide cmdShow button
  99. cmdShow.Visible = False
  100. End Sub
  101. Private Sub cmdShrink_Click()
  102. 'Shrink the form
  103. 'Decrease the form height by 100 twips
  104. frmFormFun.Height = frmFormFun.Height - 100
  105. 'Decrease the form width by 100 twips
  106. frmFormFun.Width = frmFormFun.Width - 100
  107. End Sub
  108. Private Sub Form_Click()
  109. 'Grow the form
  110. 'Increase the form height by 100 twips
  111. frmFormFun.Height = frmFormFun.Height + 100
  112. 'Increase the form width by 100 twips
  113. frmFormFun.Width = frmFormFun.Width + 100
  114. End Sub
  115.