home *** CD-ROM | disk | FTP | other *** search
/ An Introduction to Progr…l Basic 6.0 (4th Edition) / An Introduction to Programming using Visual Basic 6.0.iso / PROGRAMS / CH11 / 11-2-3.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-09-20  |  2.3 KB  |  79 lines

  1. VERSION 5.00
  2. Begin VB.Form frmOptions 
  3.    Caption         =   "Option Buttons"
  4.    ClientHeight    =   2712
  5.    ClientLeft      =   1092
  6.    ClientTop       =   1488
  7.    ClientWidth     =   2388
  8.    BeginProperty Font 
  9.       Name            =   "MS Sans Serif"
  10.       Size            =   7.8
  11.       Charset         =   0
  12.       Weight          =   700
  13.       Underline       =   0   'False
  14.       Italic          =   0   'False
  15.       Strikethrough   =   0   'False
  16.    EndProperty
  17.    LinkTopic       =   "Form1"
  18.    PaletteMode     =   1  'UseZOrder
  19.    ScaleHeight     =   2712
  20.    ScaleWidth      =   2388
  21.    Begin VB.CommandButton cmdStatus 
  22.       Caption         =   "Determine Status"
  23.       Height          =   495
  24.       Left            =   240
  25.       TabIndex        =   4
  26.       Top             =   1800
  27.       Width           =   1935
  28.    End
  29.    Begin VB.PictureBox picStatus 
  30.       Height          =   255
  31.       Left            =   480
  32.       ScaleHeight     =   204
  33.       ScaleWidth      =   1404
  34.       TabIndex        =   3
  35.       Top             =   2400
  36.       Width           =   1455
  37.    End
  38.    Begin VB.Frame fraOptions 
  39.       Caption         =   "Options"
  40.       Height          =   1575
  41.       Left            =   240
  42.       TabIndex        =   0
  43.       Top             =   120
  44.       Width           =   1815
  45.       Begin VB.OptionButton optOpt2 
  46.          Caption         =   "Option2"
  47.          Height          =   375
  48.          Left            =   120
  49.          TabIndex        =   2
  50.          Top             =   960
  51.          Width           =   1335
  52.       End
  53.       Begin VB.OptionButton optOpt1 
  54.          Caption         =   "Option1"
  55.          Height          =   375
  56.          Left            =   120
  57.          TabIndex        =   1
  58.          Top             =   360
  59.          Width           =   1215
  60.       End
  61.    End
  62. Attribute VB_Name = "frmOptions"
  63. Attribute VB_GlobalNameSpace = False
  64. Attribute VB_Creatable = False
  65. Attribute VB_PredeclaredId = True
  66. Attribute VB_Exposed = False
  67. Private Sub cmdStatus_Click()
  68.   picStatus.Cls
  69.   If optOpt1.Value Then
  70.       picStatus.Print "Option1 is on."
  71.     ElseIf optOpt2.Value Then
  72.       picStatus.Print "Option2 is on."
  73.   End If
  74. End Sub
  75. Private Sub Form_Load()
  76.   optOpt1 = False   'Turn off optOpt1
  77.   optOpt2 = False   'Turn off optOpt2
  78. End Sub
  79.