home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / ch_code / ch04 / forms / forms1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-02-20  |  10.7 KB  |  335 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Form Handling"
  5.    ClientHeight    =   4590
  6.    ClientLeft      =   165
  7.    ClientTop       =   450
  8.    ClientWidth     =   6195
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   4590
  11.    ScaleWidth      =   6195
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.CheckBox Form3Modal 
  14.       Caption         =   "Show Modal"
  15.       BeginProperty Font 
  16.          Name            =   "MS Sans Serif"
  17.          Size            =   9.75
  18.          Charset         =   0
  19.          Weight          =   400
  20.          Underline       =   0   'False
  21.          Italic          =   0   'False
  22.          Strikethrough   =   0   'False
  23.       EndProperty
  24.       Height          =   255
  25.       Left            =   3675
  26.       TabIndex        =   13
  27.       Top             =   960
  28.       Width           =   1455
  29.    End
  30.    Begin VB.CheckBox Form2Modal 
  31.       Caption         =   "Show Modal"
  32.       BeginProperty Font 
  33.          Name            =   "MS Sans Serif"
  34.          Size            =   9.75
  35.          Charset         =   0
  36.          Weight          =   400
  37.          Underline       =   0   'False
  38.          Italic          =   0   'False
  39.          Strikethrough   =   0   'False
  40.       EndProperty
  41.       Height          =   255
  42.       Left            =   630
  43.       TabIndex        =   12
  44.       Top             =   930
  45.       Width           =   1455
  46.    End
  47.    Begin VB.CommandButton LoadForm3 
  48.       Caption         =   "Load Form3"
  49.       BeginProperty Font 
  50.          Name            =   "MS Sans Serif"
  51.          Size            =   9.75
  52.          Charset         =   0
  53.          Weight          =   400
  54.          Underline       =   0   'False
  55.          Italic          =   0   'False
  56.          Strikethrough   =   0   'False
  57.       EndProperty
  58.       Height          =   375
  59.       Left            =   3675
  60.       TabIndex        =   11
  61.       Top             =   480
  62.       Width           =   1935
  63.    End
  64.    Begin VB.CommandButton LoadForm2 
  65.       Caption         =   "Load Form2"
  66.       BeginProperty Font 
  67.          Name            =   "MS Sans Serif"
  68.          Size            =   9.75
  69.          Charset         =   0
  70.          Weight          =   400
  71.          Underline       =   0   'False
  72.          Italic          =   0   'False
  73.          Strikethrough   =   0   'False
  74.       EndProperty
  75.       Height          =   375
  76.       Left            =   615
  77.       TabIndex        =   10
  78.       Top             =   450
  79.       Width           =   1935
  80.    End
  81.    Begin VB.Frame Frame2 
  82.       Caption         =   "Properties and Methods"
  83.       BeginProperty Font 
  84.          Name            =   "MS Sans Serif"
  85.          Size            =   9.75
  86.          Charset         =   0
  87.          Weight          =   400
  88.          Underline       =   0   'False
  89.          Italic          =   0   'False
  90.          Strikethrough   =   0   'False
  91.       EndProperty
  92.       Height          =   2055
  93.       Left            =   3405
  94.       TabIndex        =   6
  95.       Top             =   2160
  96.       Width           =   2475
  97.       Begin VB.CommandButton Form3Color 
  98.          Caption         =   "Background Color"
  99.          BeginProperty Font 
  100.             Name            =   "MS Sans Serif"
  101.             Size            =   9.75
  102.             Charset         =   0
  103.             Weight          =   400
  104.             Underline       =   0   'False
  105.             Italic          =   0   'False
  106.             Strikethrough   =   0   'False
  107.          EndProperty
  108.          Height          =   375
  109.          Left            =   240
  110.          TabIndex        =   9
  111.          Top             =   360
  112.          Width           =   1995
  113.       End
  114.       Begin VB.CommandButton Form3Caption 
  115.          Caption         =   "Form's Caption"
  116.          BeginProperty Font 
  117.             Name            =   "MS Sans Serif"
  118.             Size            =   9.75
  119.             Charset         =   0
  120.             Weight          =   400
  121.             Underline       =   0   'False
  122.             Italic          =   0   'False
  123.             Strikethrough   =   0   'False
  124.          EndProperty
  125.          Height          =   375
  126.          Left            =   240
  127.          TabIndex        =   8
  128.          Top             =   960
  129.          Width           =   1995
  130.       End
  131.       Begin VB.CommandButton HideForm3 
  132.          Caption         =   "Hide Form"
  133.          BeginProperty Font 
  134.             Name            =   "MS Sans Serif"
  135.             Size            =   9.75
  136.             Charset         =   0
  137.             Weight          =   400
  138.             Underline       =   0   'False
  139.             Italic          =   0   'False
  140.             Strikethrough   =   0   'False
  141.          EndProperty
  142.          Height          =   375
  143.          Left            =   240
  144.          TabIndex        =   7
  145.          Top             =   1560
  146.          Width           =   1965
  147.       End
  148.    End
  149.    Begin VB.Frame Frame1 
  150.       Caption         =   "Properties and Methods"
  151.       BeginProperty Font 
  152.          Name            =   "MS Sans Serif"
  153.          Size            =   9.75
  154.          Charset         =   0
  155.          Weight          =   400
  156.          Underline       =   0   'False
  157.          Italic          =   0   'False
  158.          Strikethrough   =   0   'False
  159.       EndProperty
  160.       Height          =   2055
  161.       Left            =   240
  162.       TabIndex        =   2
  163.       Top             =   2160
  164.       Width           =   2700
  165.       Begin VB.CommandButton HideForm2 
  166.          Caption         =   "Hide Form"
  167.          BeginProperty Font 
  168.             Name            =   "MS Sans Serif"
  169.             Size            =   9.75
  170.             Charset         =   0
  171.             Weight          =   400
  172.             Underline       =   0   'False
  173.             Italic          =   0   'False
  174.             Strikethrough   =   0   'False
  175.          EndProperty
  176.          Height          =   375
  177.          Left            =   465
  178.          TabIndex        =   5
  179.          Top             =   1575
  180.          Width           =   1875
  181.       End
  182.       Begin VB.CommandButton Form2Caption 
  183.          Caption         =   "Form's Caption"
  184.          BeginProperty Font 
  185.             Name            =   "MS Sans Serif"
  186.             Size            =   9.75
  187.             Charset         =   0
  188.             Weight          =   400
  189.             Underline       =   0   'False
  190.             Italic          =   0   'False
  191.             Strikethrough   =   0   'False
  192.          EndProperty
  193.          Height          =   375
  194.          Left            =   465
  195.          TabIndex        =   4
  196.          Top             =   975
  197.          Width           =   1890
  198.       End
  199.       Begin VB.CommandButton Form2Color 
  200.          Caption         =   "Background Color"
  201.          BeginProperty Font 
  202.             Name            =   "MS Sans Serif"
  203.             Size            =   9.75
  204.             Charset         =   0
  205.             Weight          =   400
  206.             Underline       =   0   'False
  207.             Italic          =   0   'False
  208.             Strikethrough   =   0   'False
  209.          EndProperty
  210.          Height          =   375
  211.          Left            =   465
  212.          TabIndex        =   3
  213.          Top             =   375
  214.          Width           =   1875
  215.       End
  216.    End
  217.    Begin VB.CommandButton ShowForm3 
  218.       Caption         =   "Show Form3"
  219.       BeginProperty Font 
  220.          Name            =   "MS Sans Serif"
  221.          Size            =   9.75
  222.          Charset         =   0
  223.          Weight          =   400
  224.          Underline       =   0   'False
  225.          Italic          =   0   'False
  226.          Strikethrough   =   0   'False
  227.       EndProperty
  228.       Height          =   375
  229.       Left            =   3675
  230.       TabIndex        =   1
  231.       Top             =   1320
  232.       Width           =   1935
  233.    End
  234.    Begin VB.CommandButton ShowForm2 
  235.       Caption         =   "Show Form2"
  236.       BeginProperty Font 
  237.          Name            =   "MS Sans Serif"
  238.          Size            =   9.75
  239.          Charset         =   0
  240.          Weight          =   400
  241.          Underline       =   0   'False
  242.          Italic          =   0   'False
  243.          Strikethrough   =   0   'False
  244.       EndProperty
  245.       Height          =   375
  246.       Left            =   615
  247.       TabIndex        =   0
  248.       Top             =   1290
  249.       Width           =   1935
  250.    End
  251.    Begin VB.Frame Frame3 
  252.       BackColor       =   &H00C0C0C0&
  253.       Caption         =   "Form2"
  254.       BeginProperty Font 
  255.          Name            =   "MS Sans Serif"
  256.          Size            =   9.75
  257.          Charset         =   0
  258.          Weight          =   400
  259.          Underline       =   0   'False
  260.          Italic          =   0   'False
  261.          Strikethrough   =   0   'False
  262.       EndProperty
  263.       Height          =   4215
  264.       Left            =   120
  265.       TabIndex        =   14
  266.       Top             =   120
  267.       Width           =   2985
  268.    End
  269.    Begin VB.Frame Frame4 
  270.       Caption         =   "Form3"
  271.       BeginProperty Font 
  272.          Name            =   "MS Sans Serif"
  273.          Size            =   9.75
  274.          Charset         =   0
  275.          Weight          =   400
  276.          Underline       =   0   'False
  277.          Italic          =   0   'False
  278.          Strikethrough   =   0   'False
  279.       EndProperty
  280.       Height          =   4215
  281.       Left            =   3255
  282.       TabIndex        =   15
  283.       Top             =   120
  284.       Width           =   2760
  285.    End
  286. Attribute VB_Name = "Form1"
  287. Attribute VB_GlobalNameSpace = False
  288. Attribute VB_Creatable = False
  289. Attribute VB_PredeclaredId = True
  290. Attribute VB_Exposed = False
  291. Private Sub ShowForm2_Click()
  292.     Form2.Show Form2Modal.Value
  293. End Sub
  294. Private Sub LoadForm3_Click()
  295.     If Form3Modal.Caption = "Load Form3" Then
  296.         Load Form3
  297.         LoadForm3.Caption = "Unload Form3"
  298.     Else
  299.         Unload Form3
  300.         LoadForm3.Caption = "Load Form3"
  301.     End If
  302. End Sub
  303. Private Sub ShowForm3_Click()
  304.     Form3.Show Form3Modal.Value
  305. End Sub
  306. Private Sub Form2Color_Click()
  307.     Form2.BackColor = QBColor(Rnd() * 15)
  308. End Sub
  309. Private Sub Form2Caption_Click()
  310.     Form2.Caption = "Caption changed!"
  311. End Sub
  312. Private Sub HideForm2_Click()
  313.     Form2.Hide
  314. End Sub
  315. Private Sub HideForm3_Click()
  316.     Form3.Hide
  317. End Sub
  318. Private Sub Form3Caption_Click()
  319.     Form3.Caption = "New Caption!"
  320. End Sub
  321. Private Sub Form3Color_Click()
  322.     Form3.BackColor = QBColor(Rnd() * 15)
  323. End Sub
  324. Private Sub LoadForm2_Click()
  325.     If LoadForm2.Caption = "Load Form2" Then
  326.         Load Form2
  327.         LoadForm2.Caption = "Unload Form2"
  328.     Else
  329.         Unload Form2
  330.         LoadForm2.Caption = "Load Form2"
  331.     End If
  332. End Sub
  333. Private Sub LoadForm_Click()
  334. End Sub
  335.