home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / ch_code / ch16 / ctextbox / testform.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-05-13  |  12.8 KB  |  394 lines

  1. VERSION 5.00
  2. Object = "*\ACTextBox.vbp"
  3. Begin VB.Form TestForm 
  4.    Caption         =   "ColorTextBox Control Test Form"
  5.    ClientHeight    =   4635
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   5670
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   4635
  11.    ScaleWidth      =   5670
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.CommandButton Command1 
  14.       Caption         =   "CLOSE"
  15.       BeginProperty Font 
  16.          Name            =   "Verdana"
  17.          Size            =   11.25
  18.          Charset         =   0
  19.          Weight          =   700
  20.          Underline       =   0   'False
  21.          Italic          =   0   'False
  22.          Strikethrough   =   0   'False
  23.       EndProperty
  24.       Height          =   435
  25.       Left            =   4140
  26.       TabIndex        =   17
  27.       Top             =   4080
  28.       Width           =   1395
  29.    End
  30.    Begin ColorTextBox.CTextBox CTextBox1 
  31.       Height          =   270
  32.       Index           =   1
  33.       Left            =   2205
  34.       TabIndex        =   1
  35.       Top             =   1418
  36.       Width           =   2295
  37.       _ExtentX        =   4048
  38.       _ExtentY        =   476
  39.       BackColor       =   255
  40.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  41.          Name            =   "Verdana"
  42.          Size            =   9
  43.          Charset         =   0
  44.          Weight          =   400
  45.          Underline       =   0   'False
  46.          Italic          =   0   'False
  47.          Strikethrough   =   0   'False
  48.       EndProperty
  49.       Text            =   ""
  50.       Mandatory       =   1
  51.    End
  52.    Begin ColorTextBox.CTextBox CTextBox1 
  53.       Height          =   270
  54.       Index           =   2
  55.       Left            =   2205
  56.       TabIndex        =   2
  57.       Top             =   1741
  58.       Width           =   3135
  59.       _ExtentX        =   5530
  60.       _ExtentY        =   476
  61.       BackColor       =   16777215
  62.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  63.          Name            =   "Verdana"
  64.          Size            =   9
  65.          Charset         =   0
  66.          Weight          =   400
  67.          Underline       =   0   'False
  68.          Italic          =   0   'False
  69.          Strikethrough   =   0   'False
  70.       EndProperty
  71.       Text            =   ""
  72.    End
  73.    Begin ColorTextBox.CTextBox CTextBox1 
  74.       Height          =   270
  75.       Index           =   3
  76.       Left            =   2205
  77.       TabIndex        =   3
  78.       Top             =   2064
  79.       Width           =   3135
  80.       _ExtentX        =   5530
  81.       _ExtentY        =   476
  82.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  83.          Name            =   "Verdana"
  84.          Size            =   9
  85.          Charset         =   0
  86.          Weight          =   400
  87.          Underline       =   0   'False
  88.          Italic          =   0   'False
  89.          Strikethrough   =   0   'False
  90.       EndProperty
  91.       Text            =   ""
  92.    End
  93.    Begin ColorTextBox.CTextBox CTextBox1 
  94.       Height          =   270
  95.       Index           =   4
  96.       Left            =   2205
  97.       TabIndex        =   4
  98.       Top             =   2387
  99.       Width           =   2730
  100.       _ExtentX        =   4815
  101.       _ExtentY        =   476
  102.       BackColor       =   255
  103.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  104.          Name            =   "Verdana"
  105.          Size            =   9
  106.          Charset         =   0
  107.          Weight          =   400
  108.          Underline       =   0   'False
  109.          Italic          =   0   'False
  110.          Strikethrough   =   0   'False
  111.       EndProperty
  112.       Text            =   ""
  113.       Mandatory       =   1
  114.    End
  115.    Begin ColorTextBox.CTextBox CTextBox1 
  116.       Height          =   270
  117.       Index           =   5
  118.       Left            =   2205
  119.       TabIndex        =   5
  120.       Top             =   2710
  121.       Width           =   2745
  122.       _ExtentX        =   4842
  123.       _ExtentY        =   476
  124.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  125.          Name            =   "Verdana"
  126.          Size            =   9
  127.          Charset         =   0
  128.          Weight          =   400
  129.          Underline       =   0   'False
  130.          Italic          =   0   'False
  131.          Strikethrough   =   0   'False
  132.       EndProperty
  133.       Text            =   ""
  134.    End
  135.    Begin ColorTextBox.CTextBox CTextBox1 
  136.       Height          =   270
  137.       Index           =   6
  138.       Left            =   2205
  139.       TabIndex        =   6
  140.       Top             =   3033
  141.       Width           =   2310
  142.       _ExtentX        =   4075
  143.       _ExtentY        =   476
  144.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  145.          Name            =   "Verdana"
  146.          Size            =   9
  147.          Charset         =   0
  148.          Weight          =   400
  149.          Underline       =   0   'False
  150.          Italic          =   0   'False
  151.          Strikethrough   =   0   'False
  152.       EndProperty
  153.       Text            =   ""
  154.    End
  155.    Begin ColorTextBox.CTextBox CTextBox1 
  156.       Height          =   270
  157.       Index           =   7
  158.       Left            =   2205
  159.       TabIndex        =   7
  160.       Top             =   3360
  161.       Width           =   2325
  162.       _ExtentX        =   4101
  163.       _ExtentY        =   476
  164.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  165.          Name            =   "Verdana"
  166.          Size            =   9
  167.          Charset         =   0
  168.          Weight          =   400
  169.          Underline       =   0   'False
  170.          Italic          =   0   'False
  171.          Strikethrough   =   0   'False
  172.       EndProperty
  173.       Text            =   ""
  174.    End
  175.    Begin ColorTextBox.CTextBox CTextBox1 
  176.       Height          =   270
  177.       Index           =   0
  178.       Left            =   2190
  179.       TabIndex        =   0
  180.       Top             =   1095
  181.       Width           =   1755
  182.       _ExtentX        =   3096
  183.       _ExtentY        =   476
  184.       BackColor       =   255
  185.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  186.          Name            =   "Verdana"
  187.          Size            =   9
  188.          Charset         =   0
  189.          Weight          =   400
  190.          Underline       =   0   'False
  191.          Italic          =   0   'False
  192.          Strikethrough   =   0   'False
  193.       EndProperty
  194.       Text            =   ""
  195.       Mandatory       =   1
  196.    End
  197.    Begin VB.Label Label1 
  198.       Alignment       =   1  'Right Justify
  199.       AutoSize        =   -1  'True
  200.       Caption         =   "First Name"
  201.       BeginProperty Font 
  202.          Name            =   "Verdana"
  203.          Size            =   9
  204.          Charset         =   0
  205.          Weight          =   400
  206.          Underline       =   0   'False
  207.          Italic          =   0   'False
  208.          Strikethrough   =   0   'False
  209.       EndProperty
  210.       Height          =   210
  211.       Left            =   1050
  212.       TabIndex        =   16
  213.       Top             =   1125
  214.       Width           =   1005
  215.    End
  216.    Begin VB.Label Label2 
  217.       Alignment       =   1  'Right Justify
  218.       AutoSize        =   -1  'True
  219.       Caption         =   "Last Name"
  220.       BeginProperty Font 
  221.          Name            =   "Verdana"
  222.          Size            =   9
  223.          Charset         =   0
  224.          Weight          =   400
  225.          Underline       =   0   'False
  226.          Italic          =   0   'False
  227.          Strikethrough   =   0   'False
  228.       EndProperty
  229.       Height          =   210
  230.       Left            =   1050
  231.       TabIndex        =   15
  232.       Top             =   1455
  233.       Width           =   1005
  234.    End
  235.    Begin VB.Label Label3 
  236.       Alignment       =   1  'Right Justify
  237.       AutoSize        =   -1  'True
  238.       Caption         =   "Address (line1)"
  239.       BeginProperty Font 
  240.          Name            =   "Verdana"
  241.          Size            =   9
  242.          Charset         =   0
  243.          Weight          =   400
  244.          Underline       =   0   'False
  245.          Italic          =   0   'False
  246.          Strikethrough   =   0   'False
  247.       EndProperty
  248.       Height          =   210
  249.       Left            =   630
  250.       TabIndex        =   14
  251.       Top             =   1770
  252.       Width           =   1425
  253.    End
  254.    Begin VB.Label Label4 
  255.       Alignment       =   1  'Right Justify
  256.       AutoSize        =   -1  'True
  257.       Caption         =   "Address (line2)"
  258.       BeginProperty Font 
  259.          Name            =   "Verdana"
  260.          Size            =   9
  261.          Charset         =   0
  262.          Weight          =   400
  263.          Underline       =   0   'False
  264.          Italic          =   0   'False
  265.          Strikethrough   =   0   'False
  266.       EndProperty
  267.       Height          =   210
  268.       Left            =   630
  269.       TabIndex        =   13
  270.       Top             =   2100
  271.       Width           =   1425
  272.    End
  273.    Begin VB.Label Label5 
  274.       Alignment       =   1  'Right Justify
  275.       AutoSize        =   -1  'True
  276.       Caption         =   "E-Mail"
  277.       BeginProperty Font 
  278.          Name            =   "Verdana"
  279.          Size            =   9
  280.          Charset         =   0
  281.          Weight          =   400
  282.          Underline       =   0   'False
  283.          Italic          =   0   'False
  284.          Strikethrough   =   0   'False
  285.       EndProperty
  286.       Height          =   210
  287.       Left            =   1500
  288.       TabIndex        =   12
  289.       Top             =   2417
  290.       Width           =   555
  291.    End
  292.    Begin VB.Label Label6 
  293.       Alignment       =   1  'Right Justify
  294.       AutoSize        =   -1  'True
  295.       Caption         =   "E-Mail (alternate)"
  296.       BeginProperty Font 
  297.          Name            =   "Verdana"
  298.          Size            =   9
  299.          Charset         =   0
  300.          Weight          =   400
  301.          Underline       =   0   'False
  302.          Italic          =   0   'False
  303.          Strikethrough   =   0   'False
  304.       EndProperty
  305.       Height          =   210
  306.       Left            =   420
  307.       TabIndex        =   11
  308.       Top             =   2740
  309.       Width           =   1635
  310.    End
  311.    Begin VB.Label Label7 
  312.       Alignment       =   1  'Right Justify
  313.       AutoSize        =   -1  'True
  314.       Caption         =   "Telephone"
  315.       BeginProperty Font 
  316.          Name            =   "Verdana"
  317.          Size            =   9
  318.          Charset         =   0
  319.          Weight          =   400
  320.          Underline       =   0   'False
  321.          Italic          =   0   'False
  322.          Strikethrough   =   0   'False
  323.       EndProperty
  324.       Height          =   210
  325.       Left            =   1065
  326.       TabIndex        =   10
  327.       Top             =   3063
  328.       Width           =   990
  329.    End
  330.    Begin VB.Label Label8 
  331.       Alignment       =   1  'Right Justify
  332.       AutoSize        =   -1  'True
  333.       Caption         =   "FAX"
  334.       BeginProperty Font 
  335.          Name            =   "Verdana"
  336.          Size            =   9
  337.          Charset         =   0
  338.          Weight          =   400
  339.          Underline       =   0   'False
  340.          Italic          =   0   'False
  341.          Strikethrough   =   0   'False
  342.       EndProperty
  343.       Height          =   210
  344.       Left            =   1710
  345.       TabIndex        =   9
  346.       Top             =   3390
  347.       Width           =   345
  348.    End
  349.    Begin VB.Label Label9 
  350.       Alignment       =   2  'Center
  351.       BorderStyle     =   1  'Fixed Single
  352.       Caption         =   "Some fields are required. If left blank, they will be colored red."
  353.       BeginProperty Font 
  354.          Name            =   "Verdana"
  355.          Size            =   11.25
  356.          Charset         =   0
  357.          Weight          =   400
  358.          Underline       =   0   'False
  359.          Italic          =   0   'False
  360.          Strikethrough   =   0   'False
  361.       EndProperty
  362.       Height          =   3750
  363.       Left            =   105
  364.       TabIndex        =   8
  365.       Top             =   120
  366.       Width           =   5445
  367.    End
  368. Attribute VB_Name = "TestForm"
  369. Attribute VB_GlobalNameSpace = False
  370. Attribute VB_Creatable = False
  371. Attribute VB_PredeclaredId = True
  372. Attribute VB_Exposed = False
  373. '  ******************************
  374. '  ******************************
  375. '  ** MASTERING VB6            **
  376. '  ** by Evangelos Petroutos   **
  377. '  ** SYBEX, 1998              **
  378. '  ******************************
  379. '  ******************************
  380. Private Sub Command1_Click()
  381.     For i = 1 To 7
  382.         If CTextBox1(i).Mandatory = Required And (CTextBox1(i).MandatoryColor = CTextBox1(i).BackColor) Then
  383.             reply = MsgBox("There is at least one empty required field. " & vbCrLf & "Are you sure you want to exit?", vbYesNo)
  384.             If reply = vbYes Then
  385.                 End
  386.             Else
  387.                 Exit Sub
  388.             End If
  389.         End If
  390.     Next
  391.     MsgBox "Thank you for registering!"
  392.     End
  393. End Sub
  394.