home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form LSAMPLE
- BackColor = &H00C0C0C0&
- BorderStyle = 3 'Fixed Double
- Caption = "LED Sample"
- ClientHeight = 465
- ClientLeft = 1605
- ClientTop = 1740
- ClientWidth = 3825
- Height = 870
- Left = 1545
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 465
- ScaleWidth = 3825
- Top = 1395
- Width = 3945
- Begin Timer Timer1
- Interval = 55
- Left = 240
- Top = 240
- End
- Begin MabryLED LED1
- BackColor = &H00C0C0C0&
- BevelInner = 3 'Lowered
- BevelInnerShape = 1 'Ellipse
- BevelOuter = 1 'Raised
- BevelOuterShape = 0 'Rectangle
- BevelWidth = 1
- Border = 1 'Single Width
- BorderWidth = 4
- DisabledColor = &H00C0C0C0&
- Height = 465
- Index = 7
- Left = 3360
- OffColor = &H00808080&
- OnColor = &H000000FF&
- Top = 0
- Value = -1 'True
- Width = 465
- End
- Begin MabryLED LED1
- BackColor = &H00C0C0C0&
- BevelInner = 3 'Lowered
- BevelInnerShape = 1 'Ellipse
- BevelOuter = 1 'Raised
- BevelOuterShape = 0 'Rectangle
- BevelWidth = 1
- Border = 1 'Single Width
- BorderWidth = 4
- DisabledColor = &H00C0C0C0&
- Height = 465
- Index = 6
- Left = 480
- OffColor = &H00808080&
- OnColor = &H000000FF&
- Top = 0
- Value = -1 'True
- Width = 465
- End
- Begin MabryLED LED1
- BackColor = &H00C0C0C0&
- BevelInner = 3 'Lowered
- BevelInnerShape = 1 'Ellipse
- BevelOuter = 1 'Raised
- BevelOuterShape = 0 'Rectangle
- BevelWidth = 1
- Border = 1 'Single Width
- BorderWidth = 4
- DisabledColor = &H00C0C0C0&
- Height = 465
- Index = 5
- Left = 960
- OffColor = &H00808080&
- OnColor = &H000000FF&
- Top = 0
- Value = -1 'True
- Width = 465
- End
- Begin MabryLED LED1
- BackColor = &H00C0C0C0&
- BevelInner = 3 'Lowered
- BevelInnerShape = 1 'Ellipse
- BevelOuter = 1 'Raised
- BevelOuterShape = 0 'Rectangle
- BevelWidth = 1
- Border = 1 'Single Width
- BorderWidth = 4
- DisabledColor = &H00C0C0C0&
- Height = 465
- Index = 4
- Left = 1440
- OffColor = &H00808080&
- OnColor = &H000000FF&
- Top = 0
- Value = -1 'True
- Width = 465
- End
- Begin MabryLED LED1
- BackColor = &H00C0C0C0&
- BevelInner = 3 'Lowered
- BevelInnerShape = 1 'Ellipse
- BevelOuter = 1 'Raised
- BevelOuterShape = 0 'Rectangle
- BevelWidth = 1
- Border = 1 'Single Width
- BorderWidth = 4
- DisabledColor = &H00C0C0C0&
- Height = 465
- Index = 3
- Left = 1920
- OffColor = &H00808080&
- OnColor = &H000000FF&
- Top = 0
- Value = -1 'True
- Width = 465
- End
- Begin MabryLED LED1
- BackColor = &H00C0C0C0&
- BevelInner = 3 'Lowered
- BevelInnerShape = 1 'Ellipse
- BevelOuter = 1 'Raised
- BevelOuterShape = 0 'Rectangle
- BevelWidth = 1
- Border = 1 'Single Width
- BorderWidth = 4
- DisabledColor = &H00C0C0C0&
- Height = 465
- Index = 2
- Left = 2400
- OffColor = &H00808080&
- OnColor = &H000000FF&
- Top = 0
- Value = -1 'True
- Width = 465
- End
- Begin MabryLED LED1
- BackColor = &H00C0C0C0&
- BevelInner = 3 'Lowered
- BevelInnerShape = 1 'Ellipse
- BevelOuter = 1 'Raised
- BevelOuterShape = 0 'Rectangle
- BevelWidth = 1
- Border = 1 'Single Width
- BorderWidth = 4
- DisabledColor = &H00C0C0C0&
- Height = 465
- Index = 1
- Left = 2880
- OffColor = &H00808080&
- OnColor = &H000000FF&
- Top = 0
- Value = -1 'True
- Width = 465
- End
- Begin MabryLED LED1
- BackColor = &H00C0C0C0&
- BevelInner = 3 'Lowered
- BevelInnerShape = 1 'Ellipse
- BevelOuter = 1 'Raised
- BevelOuterShape = 0 'Rectangle
- BevelWidth = 1
- Border = 1 'Single Width
- BorderWidth = 4
- DisabledColor = &H00C0C0C0&
- Height = 465
- Index = 0
- Left = 0
- OffColor = &H00808080&
- OnColor = &H000000FF&
- Top = 0
- Value = -1 'True
- Width = 465
- End
- Option Explicit
- Sub Form_Unload (Cancel As Integer)
- End
- End Sub
- Sub Timer1_Timer ()
- Dim I As Integer
- Dim J As Integer
- Dim N As Integer
- ' Randomly blink from 1 to 3 of the LEDs
- N = Int(Rnd * 3) + 1
- For J = 1 To N
- I = Int(Rnd * 8)
- LED1(I).Value = Not LED1(I).Value
- Next J
- End Sub
-