home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / megled / megled.cab / frmMegLed_Sample.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-07-06  |  2.7 KB  |  87 lines

  1. VERSION 5.00
  2. Object = "{54E93368-0B1A-11D3-A252-94F075FBAB23}#8.0#0"; "MEGLED.OCX"
  3. Begin VB.Form Form1 
  4.    Caption         =   "MegLED Sample Program"
  5.    ClientHeight    =   2895
  6.    ClientLeft      =   6645
  7.    ClientTop       =   3885
  8.    ClientWidth     =   3480
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   2895
  11.    ScaleWidth      =   3480
  12.    Begin MegLED.LED LED1 
  13.       Height          =   495
  14.       Left            =   1440
  15.       TabIndex        =   5
  16.       Top             =   1200
  17.       Width           =   495
  18.       _ExtentX        =   873
  19.       _ExtentY        =   873
  20.    End
  21.    Begin VB.CommandButton Command2 
  22.       Caption         =   "BLUE"
  23.       Height          =   495
  24.       Index           =   4
  25.       Left            =   2400
  26.       TabIndex        =   4
  27.       Top             =   2280
  28.       Width           =   975
  29.    End
  30.    Begin VB.CommandButton Command2 
  31.       Caption         =   "YELLOW"
  32.       Height          =   495
  33.       Index           =   3
  34.       Left            =   2400
  35.       TabIndex        =   3
  36.       Top             =   1560
  37.       Width           =   975
  38.    End
  39.    Begin VB.CommandButton Command2 
  40.       Caption         =   "GREEN"
  41.       Height          =   495
  42.       Index           =   2
  43.       Left            =   2400
  44.       TabIndex        =   2
  45.       Top             =   840
  46.       Width           =   975
  47.    End
  48.    Begin VB.CommandButton Command2 
  49.       Caption         =   "RED"
  50.       Height          =   495
  51.       Index           =   1
  52.       Left            =   2400
  53.       TabIndex        =   1
  54.       Top             =   120
  55.       Width           =   975
  56.    End
  57.    Begin VB.CommandButton Command1 
  58.       Caption         =   "ON/OFF"
  59.       Height          =   975
  60.       Left            =   120
  61.       TabIndex        =   0
  62.       Top             =   960
  63.       Width           =   975
  64.    End
  65. Attribute VB_Name = "Form1"
  66. Attribute VB_GlobalNameSpace = False
  67. Attribute VB_Creatable = False
  68. Attribute VB_PredeclaredId = True
  69. Attribute VB_Exposed = False
  70. 'MegLED_Sample
  71. 'J. Graham
  72. '06-July-1999
  73. 'Simple demonstration of MegLED.ocx.
  74. 'Shows LED ON, OFF, and Colors.
  75. Private Sub Command1_Click()
  76.     LED1.LEDValue = Not (LED1.LEDValue) 'Change LED to opposite of previous state.
  77. End Sub
  78. Private Sub Command2_Click(Index As Integer)
  79.     LED1.LED3DONColor = Index       'Set color depending upon which button was pressed.
  80.     LED1.LED3DOFFColor = Index      'Since there are only 4 3D colors,
  81.                                     'I'm using the component index for color as well.
  82. End Sub
  83. Private Sub Form_Load()
  84.     LED1.LED3D = True               'Set default LED appearance to 3D.
  85.     Form1.Show 0                    'Now display the form.
  86. End Sub
  87.