home *** CD-ROM | disk | FTP | other *** search
/ On Hand / On_Hand_From_Softbank_1994_Release_2_Disc_2_1994.iso / 00202 / s / disk1 / button.fr_ / button.bin
Text File  |  1993-04-28  |  2KB  |  89 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. End
  52.  
  53. Sub ChangeSignal ()
  54. ' Check to see what color the light is and change
  55. ' it to the next color.  The order is green, yellow,
  56. ' and then red.
  57.     If imgGreen.Visible = True Then
  58.         imgGreen.Visible = False
  59.         imgYellow.Visible = True
  60.     ElseIf imgYellow.Visible = True Then
  61.         imgYellow.Visible = False
  62.         imgRed.Visible = True
  63.     Else
  64.         imgRed.Visible = False
  65.         imgGreen.Visible = True
  66.     End If
  67. End Sub
  68.  
  69. Sub cmdChange_Click ()
  70.     ChangeSignal        'Call procedure.
  71. End Sub
  72.  
  73. Sub cmdClose_Click ()
  74.    Unload Me    ' Unload this form.
  75. End Sub
  76.  
  77. Sub imgGreen_Click ()
  78.     ChangeSignal        'Call procedure.
  79. End Sub
  80.  
  81. Sub imgRed_Click ()
  82.     ChangeSignal        'Call procedure.
  83. End Sub
  84.  
  85. Sub imgYellow_Click ()
  86.     ChangeSignal        'Call procedure.
  87. End Sub
  88.  
  89.