home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{54E93368-0B1A-11D3-A252-94F075FBAB23}#8.0#0"; "MEGLED.OCX"
- Begin VB.Form Form1
- Caption = "MegLED Sample Program"
- ClientHeight = 2895
- ClientLeft = 6645
- ClientTop = 3885
- ClientWidth = 3480
- LinkTopic = "Form1"
- ScaleHeight = 2895
- ScaleWidth = 3480
- Begin MegLED.LED LED1
- Height = 495
- Left = 1440
- TabIndex = 5
- Top = 1200
- Width = 495
- _ExtentX = 873
- _ExtentY = 873
- End
- Begin VB.CommandButton Command2
- Caption = "BLUE"
- Height = 495
- Index = 4
- Left = 2400
- TabIndex = 4
- Top = 2280
- Width = 975
- End
- Begin VB.CommandButton Command2
- Caption = "YELLOW"
- Height = 495
- Index = 3
- Left = 2400
- TabIndex = 3
- Top = 1560
- Width = 975
- End
- Begin VB.CommandButton Command2
- Caption = "GREEN"
- Height = 495
- Index = 2
- Left = 2400
- TabIndex = 2
- Top = 840
- Width = 975
- End
- Begin VB.CommandButton Command2
- Caption = "RED"
- Height = 495
- Index = 1
- Left = 2400
- TabIndex = 1
- Top = 120
- Width = 975
- End
- Begin VB.CommandButton Command1
- Caption = "ON/OFF"
- Height = 975
- Left = 120
- TabIndex = 0
- Top = 960
- Width = 975
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- 'MegLED_Sample
- 'J. Graham
- '06-July-1999
- 'Simple demonstration of MegLED.ocx.
- 'Shows LED ON, OFF, and Colors.
- Private Sub Command1_Click()
- LED1.LEDValue = Not (LED1.LEDValue) 'Change LED to opposite of previous state.
- End Sub
- Private Sub Command2_Click(Index As Integer)
- LED1.LED3DONColor = Index 'Set color depending upon which button was pressed.
- LED1.LED3DOFFColor = Index 'Since there are only 4 3D colors,
- 'I'm using the component index for color as well.
- End Sub
- Private Sub Form_Load()
- LED1.LED3D = True 'Set default LED appearance to 3D.
- Form1.Show 0 'Now display the form.
- End Sub
-