home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual BASIC 5.0 (Ent. Edition) / Vb5ent Extractor.EXE / VB / SAMPLES / PGUIDE / CONTROLS / CHECK.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-09-16  |  4.5 KB  |  137 lines

  1. VERSION 5.00
  2. Begin VB.Form frmCheck 
  3.    Caption         =   "Check Box Example"
  4.    ClientHeight    =   3075
  5.    ClientLeft      =   2145
  6.    ClientTop       =   1980
  7.    ClientWidth     =   4530
  8.    BeginProperty Font 
  9.       Name            =   "MS Sans Serif"
  10.       Size            =   8.25
  11.       Charset         =   0
  12.       Weight          =   700
  13.       Underline       =   0   'False
  14.       Italic          =   0   'False
  15.       Strikethrough   =   0   'False
  16.    EndProperty
  17.    Height          =   3480
  18.    Left            =   2085
  19.    LinkTopic       =   "Form4"
  20.    ScaleHeight     =   3075
  21.    ScaleWidth      =   4530
  22.    Top             =   1635
  23.    Width           =   4650
  24.    Begin VB.CommandButton cmdClose 
  25.       Caption         =   "&Close"
  26.       BeginProperty Font 
  27.          Name            =   "MS Sans Serif"
  28.          Size            =   8.25
  29.          Charset         =   0
  30.          Weight          =   400
  31.          Underline       =   0   'False
  32.          Italic          =   0   'False
  33.          Strikethrough   =   0   'False
  34.       EndProperty
  35.       Height          =   495
  36.       Left            =   3000
  37.       TabIndex        =   3
  38.       Top             =   2160
  39.       Width           =   1095
  40.    End
  41.    Begin VB.CheckBox chkItalic 
  42.       Caption         =   "&Italic"
  43.       BeginProperty Font 
  44.          Name            =   "MS Sans Serif"
  45.          Size            =   8.25
  46.          Charset         =   0
  47.          Weight          =   400
  48.          Underline       =   0   'False
  49.          Italic          =   0   'False
  50.          Strikethrough   =   0   'False
  51.       EndProperty
  52.       Height          =   495
  53.       Left            =   480
  54.       TabIndex        =   2
  55.       Top             =   1440
  56.       Width           =   1215
  57.    End
  58.    Begin VB.CheckBox chkBold 
  59.       Caption         =   "&Bold"
  60.       BeginProperty Font 
  61.          Name            =   "MS Sans Serif"
  62.          Size            =   8.25
  63.          Charset         =   0
  64.          Weight          =   400
  65.          Underline       =   0   'False
  66.          Italic          =   0   'False
  67.          Strikethrough   =   0   'False
  68.       EndProperty
  69.       Height          =   495
  70.       Left            =   480
  71.       TabIndex        =   1
  72.       Top             =   960
  73.       Width           =   1215
  74.    End
  75.    Begin VB.TextBox txtDisplay 
  76.       BeginProperty Font 
  77.          Name            =   "MS Sans Serif"
  78.          Size            =   8.25
  79.          Charset         =   0
  80.          Weight          =   400
  81.          Underline       =   0   'False
  82.          Italic          =   0   'False
  83.          Strikethrough   =   0   'False
  84.       EndProperty
  85.       Height          =   375
  86.       Left            =   480
  87.       TabIndex        =   0
  88.       Text            =   "Some sample text"
  89.       Top             =   360
  90.       Width           =   3615
  91.    End
  92.    Begin VB.Label lblEnter 
  93.       Caption         =   "Select the Bold or Italic check boxes to see their effect on the above text."
  94.       BeginProperty Font 
  95.          Name            =   "MS Sans Serif"
  96.          Size            =   8.25
  97.          Charset         =   0
  98.          Weight          =   400
  99.          Underline       =   0   'False
  100.          Italic          =   0   'False
  101.          Strikethrough   =   0   'False
  102.       EndProperty
  103.       Height          =   615
  104.       Left            =   1800
  105.       TabIndex        =   4
  106.       Top             =   1080
  107.       Width           =   2295
  108.    End
  109. Attribute VB_Name = "frmCheck"
  110. Attribute VB_Base = "0{1D93679D-C9EF-11CF-84BA-00AA00C007F0}"
  111. Attribute VB_Creatable = False
  112. Attribute VB_TemplateDerived = False
  113. Attribute VB_PredeclaredId = True
  114. Attribute VB_Exposed = False
  115. Attribute VB_Customizable = False
  116. Private Sub chkBold_Click()
  117. ' The Click event occurs when the check box changes state.
  118. ' Value property indicates the new state of the check box.
  119.     If chkBold.Value = 1 Then     ' If checked.
  120.         txtDisplay.FontBold = True
  121.     Else                          ' If not checked.
  122.         txtDisplay.FontBold = False
  123.     End If
  124. End Sub
  125. Private Sub chkItalic_Click()
  126. ' The Click event occurs when the check box changes state.
  127. ' Value property indicates the new state of the check box.
  128.     If chkItalic.Value = 1 Then     ' If checked.
  129.         txtDisplay.FontItalic = True
  130.     Else                          ' If not checked.
  131.         txtDisplay.FontItalic = False
  132.     End If
  133. End Sub
  134. Private Sub cmdClose_Click()
  135.    Unload Me    ' Unload this form.
  136. End Sub
  137.