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 / BUTTON.FRM (.txt) next >
Encoding:
Visual Basic Form  |  1996-09-16  |  4.4 KB  |  137 lines

  1. VERSION 5.00
  2. Begin VB.Form frmButton 
  3.    Caption         =   "Test Buttons"
  4.    ClientHeight    =   2790
  5.    ClientLeft      =   1815
  6.    ClientTop       =   2205
  7.    ClientWidth     =   4770
  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          =   3195
  18.    Left            =   1755
  19.    LinkTopic       =   "Form3"
  20.    ScaleHeight     =   2790
  21.    ScaleWidth      =   4770
  22.    Top             =   1860
  23.    Width           =   4890
  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        =   1
  38.       Top             =   1320
  39.       Width           =   1215
  40.    End
  41.    Begin VB.CommandButton cmdChange 
  42.       Caption         =   "Change &Signal"
  43.       Default         =   -1  'True
  44.       BeginProperty Font 
  45.          Name            =   "MS Sans Serif"
  46.          Size            =   8.25
  47.          Charset         =   0
  48.          Weight          =   400
  49.          Underline       =   0   'False
  50.          Italic          =   0   'False
  51.          Strikethrough   =   0   'False
  52.       EndProperty
  53.       Height          =   495
  54.       Left            =   600
  55.       TabIndex        =   0
  56.       Top             =   1320
  57.       Width           =   1815
  58.    End
  59.    Begin VB.Label lblHelp 
  60.       Caption         =   "To change the signal, click either the Change Signal button or the traffic signal icon itself."
  61.       BeginProperty Font 
  62.          Name            =   "MS Sans Serif"
  63.          Size            =   8.25
  64.          Charset         =   0
  65.          Weight          =   400
  66.          Underline       =   0   'False
  67.          Italic          =   0   'False
  68.          Strikethrough   =   0   'False
  69.       EndProperty
  70.       Height          =   495
  71.       Left            =   600
  72.       TabIndex        =   2
  73.       Top             =   2040
  74.       Width           =   3615
  75.    End
  76.    Begin VB.Image imgRed 
  77.       Appearance      =   0  'Flat
  78.       Height          =   480
  79.       Left            =   2160
  80.       Picture         =   "BUTTON.frx":0000
  81.       Top             =   480
  82.       Visible         =   0   'False
  83.       Width           =   480
  84.    End
  85.    Begin VB.Image imgYellow 
  86.       Height          =   480
  87.       Left            =   2160
  88.       Picture         =   "BUTTON.frx":030A
  89.       Top             =   480
  90.       Visible         =   0   'False
  91.       Width           =   480
  92.    End
  93.    Begin VB.Image imgGreen 
  94.       Height          =   480
  95.       Left            =   2160
  96.       Picture         =   "BUTTON.frx":0614
  97.       Top             =   480
  98.       Width           =   480
  99.    End
  100. Attribute VB_Name = "frmButton"
  101. Attribute VB_Base = "0{1D936797-C9EF-11CF-84BA-00AA00C007F0}"
  102. Attribute VB_Creatable = False
  103. Attribute VB_TemplateDerived = False
  104. Attribute VB_PredeclaredId = True
  105. Attribute VB_Exposed = False
  106. Attribute VB_Customizable = False
  107. Private Sub ChangeSignal()
  108.     ' Check to see what color the light is, and then change
  109.     ' it to the next color.  The order is green, yellow,
  110.     ' and then red.
  111.     If imgGreen.Visible = True Then
  112.         imgGreen.Visible = False
  113.         imgYellow.Visible = True
  114.     ElseIf imgYellow.Visible = True Then
  115.         imgYellow.Visible = False
  116.         imgRed.Visible = True
  117.     Else
  118.         imgRed.Visible = False
  119.         imgGreen.Visible = True
  120.     End If
  121. End Sub
  122. Private Sub cmdChange_Click()
  123.     Call ChangeSignal        ' Call the ChangeSignal procedure.
  124. End Sub
  125. Private Sub cmdClose_Click()
  126.    Unload Me            ' Unload this form.
  127. End Sub
  128. Private Sub imgGreen_Click()
  129.     Call ChangeSignal        ' Call the ChangeSignal procedure.
  130. End Sub
  131. Private Sub imgRed_Click()
  132.     Call ChangeSignal        ' Call the ChangeSignal procedure.
  133. End Sub
  134. Private Sub imgYellow_Click()
  135.     Call ChangeSignal        ' Call the ChangeSignal procedure.
  136. End Sub
  137.