home *** CD-ROM | disk | FTP | other *** search
/ Master 95 #1 / MASTER95_1.iso / microsof / vbasic4 / vb4-6.cab / check.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-07-26  |  3.1 KB  |  101 lines

  1. VERSION 4.00
  2. Begin VB.Form frmCheck 
  3.    Caption         =   "Check Box Example"
  4.    ClientHeight    =   3480
  5.    ClientLeft      =   2145
  6.    ClientTop       =   1980
  7.    ClientWidth     =   4695
  8.    BeginProperty Font 
  9.       name            =   "MS Sans Serif"
  10.       charset         =   1
  11.       weight          =   700
  12.       size            =   8.25
  13.       underline       =   0   'False
  14.       italic          =   0   'False
  15.       strikethrough   =   0   'False
  16.    EndProperty
  17.    Height          =   3885
  18.    Left            =   2085
  19.    LinkTopic       =   "Form4"
  20.    ScaleHeight     =   3480
  21.    ScaleWidth      =   4695
  22.    Top             =   1635
  23.    Width           =   4815
  24.    Begin VB.CommandButton cmdClose 
  25.       Caption         =   "&Close"
  26.       Height          =   495
  27.       Left            =   3045
  28.       TabIndex        =   3
  29.       Top             =   2520
  30.       Width           =   1095
  31.    End
  32.    Begin VB.CheckBox chkItalic 
  33.       Caption         =   "&Italic"
  34.       Height          =   495
  35.       Left            =   600
  36.       TabIndex        =   2
  37.       Top             =   2640
  38.       Width           =   1215
  39.    End
  40.    Begin VB.CheckBox chkBold 
  41.       Caption         =   "&Bold"
  42.       Height          =   495
  43.       Left            =   600
  44.       TabIndex        =   1
  45.       Top             =   2160
  46.       Width           =   1215
  47.    End
  48.    Begin VB.TextBox txtDisplay 
  49.       BeginProperty Font 
  50.          name            =   "MS Sans Serif"
  51.          charset         =   1
  52.          weight          =   400
  53.          size            =   8.25
  54.          underline       =   0   'False
  55.          italic          =   0   'False
  56.          strikethrough   =   0   'False
  57.       EndProperty
  58.       Height          =   975
  59.       Left            =   600
  60.       MultiLine       =   -1  'True
  61.       TabIndex        =   0
  62.       Top             =   840
  63.       Width           =   3495
  64.    End
  65.    Begin VB.Label lblEnter 
  66.       Caption         =   "Enter your text here:"
  67.       Height          =   255
  68.       Left            =   600
  69.       TabIndex        =   4
  70.       Top             =   480
  71.       Width           =   2775
  72.    End
  73. Attribute VB_Name = "frmCheck"
  74. Attribute VB_Creatable = False
  75. Attribute VB_Exposed = False
  76. Private Sub chkBold_Click()
  77. ' The Click event occurs when the check box changes state.
  78. ' Value property indicates the new state of the check box.
  79.     Dim objF As Font
  80.     Set objF = txtDisplay.Font
  81.     If ChkBold.Value = vbChecked Then       ' If checked.
  82.         objF.Bold = True
  83.     Else                            ' If not checked.
  84.         objF.Bold = False
  85.     End If
  86. End Sub
  87. Private Sub chkItalic_Click()
  88. ' The Click event occurs when the check box changes state.
  89. ' Value property indicates the new state of check box.
  90.     Dim objF As Font
  91.     Set objF = txtDisplay.Font
  92.     If ChkItalic.Value = vbChecked Then     ' If checked.
  93.             objF.Italic = True
  94.     Else                            ' If not checked.
  95.         objF.Italic = False
  96.     End If
  97. End Sub
  98. Private Sub cmdClose_Click()
  99.    Unload Me    ' Unload this form.
  100. End Sub
  101.