home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l405 / 1.ddi / BUTTON.FR_ / BUTTON.bin (.txt)
Encoding:
Visual Basic Form  |  1993-04-28  |  2.3 KB  |  81 lines

  1. VERSION 2.00
  2. Begin Form frmButton 
  3.    Caption         =   "Test Buttons"
  4.    Height          =   3210
  5.    Left            =   1845
  6.    LinkTopic       =   "Form3"
  7.    ScaleHeight     =   2805
  8.    ScaleWidth      =   4755
  9.    Top             =   1785
  10.    Width           =   4875
  11.    Begin CommandButton cmdClose 
  12.       Caption         =   "&Close"
  13.       Height          =   495
  14.       Left            =   3000
  15.       TabIndex        =   1
  16.       Top             =   1800
  17.       Width           =   1215
  18.    End
  19.    Begin CommandButton cmdChange 
  20.       Caption         =   "Change &Signal"
  21.       Default         =   -1  'True
  22.       Height          =   495
  23.       Left            =   600
  24.       TabIndex        =   0
  25.       Top             =   1800
  26.       Width           =   1815
  27.    End
  28.    Begin Image imgRed 
  29.       Height          =   480
  30.       Left            =   2160
  31.       Picture         =   Button.FRX:0000
  32.       Top             =   720
  33.       Visible         =   0   'False
  34.       Width           =   480
  35.    End
  36.    Begin Image imgYellow 
  37.       Height          =   480
  38.       Left            =   2160
  39.       Picture         =   Button.FRX:0302
  40.       Top             =   720
  41.       Visible         =   0   'False
  42.       Width           =   480
  43.    End
  44.    Begin Image imgGreen 
  45.       Height          =   480
  46.       Left            =   2160
  47.       Picture         =   Button.FRX:0604
  48.       Top             =   720
  49.       Width           =   480
  50.    End
  51. Sub ChangeSignal ()
  52. ' Check to see what color the light is and change
  53. ' it to the next color.  The order is green, yellow,
  54. ' and then red.
  55.     If imgGreen.Visible = True Then
  56.         imgGreen.Visible = False
  57.         imgYellow.Visible = True
  58.     ElseIf imgYellow.Visible = True Then
  59.         imgYellow.Visible = False
  60.         imgRed.Visible = True
  61.     Else
  62.         imgRed.Visible = False
  63.         imgGreen.Visible = True
  64.     End If
  65. End Sub
  66. Sub cmdChange_Click ()
  67.     ChangeSignal        'Call procedure.
  68. End Sub
  69. Sub cmdClose_Click ()
  70.    Unload Me    ' Unload this form.
  71. End Sub
  72. Sub imgGreen_Click ()
  73.     ChangeSignal        'Call procedure.
  74. End Sub
  75. Sub imgRed_Click ()
  76.     ChangeSignal        'Call procedure.
  77. End Sub
  78. Sub imgYellow_Click ()
  79.     ChangeSignal        'Call procedure.
  80. End Sub
  81.