home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form LEDStyles
- BackColor = &H00C0C0C0&
- BorderStyle = 1 'Fixed Single
- Caption = "LED Custom Bitmaps"
- ClientHeight = 6180
- ClientLeft = 3645
- ClientTop = 1740
- ClientWidth = 7185
- Height = 6585
- Left = 3585
- LinkTopic = "Form1"
- MDIChild = -1 'True
- MinButton = 0 'False
- ScaleHeight = 6180
- ScaleWidth = 7185
- Top = 1395
- Width = 7305
- Begin Timer Timer1
- Interval = 500
- Left = 4035
- Top = 5235
- End
- Begin Frame Frame1
- BackColor = &H00C0C0C0&
- Caption = "LED Size Properties"
- Height = 1050
- Left = 165
- TabIndex = 12
- Top = 4965
- Width = 3660
- Begin HScrollBar HScroll1
- Height = 285
- Index = 1
- Left = 1365
- Max = 50
- TabIndex = 14
- Top = 660
- Width = 1575
- End
- Begin HScrollBar HScroll1
- Height = 285
- Index = 0
- Left = 1365
- Max = 50
- TabIndex = 13
- Top = 375
- Width = 1575
- End
- Begin Label Label1
- Alignment = 1 'Right Justify
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- Caption = "LEDWidth :"
- Height = 195
- Index = 3
- Left = 345
- TabIndex = 11
- Top = 720
- Width = 990
- End
- Begin Label Label1
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- Caption = "LEDHeight :"
- Height = 195
- Index = 2
- Left = 285
- TabIndex = 10
- Top = 435
- Width = 1050
- End
- Begin Label Label1
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- Caption = "0"
- Height = 195
- Index = 1
- Left = 2970
- TabIndex = 16
- Top = 720
- Width = 120
- End
- Begin Label Label1
- AutoSize = -1 'True
- BackColor = &H00C0C0C0&
- Caption = "0"
- Height = 195
- Index = 0
- Left = 2985
- TabIndex = 15
- Top = 435
- Width = 120
- End
- End
- Begin Frame Frame3
- BackColor = &H00C0C0C0&
- Caption = "LED State/Color Properties"
- Height = 3615
- Left = 165
- TabIndex = 8
- Top = 1290
- Width = 2865
- Begin OptionButton Option2
- BackColor = &H00C0C0C0&
- Caption = "Red On Picture"
- Height = 225
- Index = 0
- Left = 195
- TabIndex = 2
- Top = 420
- Value = -1 'True
- Width = 1965
- End
- Begin OptionButton Option2
- BackColor = &H00C0C0C0&
- Caption = "Red Off Picture"
- Height = 225
- Index = 1
- Left = 195
- TabIndex = 3
- Top = 930
- Width = 1965
- End
- Begin OptionButton Option2
- BackColor = &H00C0C0C0&
- Caption = "Yellow On Picture"
- Height = 225
- Index = 2
- Left = 195
- TabIndex = 4
- Top = 1470
- Width = 1965
- End
- Begin OptionButton Option2
- BackColor = &H00C0C0C0&
- Caption = "Yellow Off Picture"
- Height = 225
- Index = 3
- Left = 195
- TabIndex = 5
- Top = 2040
- Width = 1965
- End
- Begin OptionButton Option2
- BackColor = &H00C0C0C0&
- Caption = "Green On Picture"
- Height = 225
- Index = 4
- Left = 195
- TabIndex = 6
- Top = 2580
- Width = 1965
- End
- Begin OptionButton Option2
- BackColor = &H00C0C0C0&
- Caption = "Green Off Picture"
- Height = 225
- Index = 5
- Left = 195
- TabIndex = 9
- Top = 3120
- Width = 1965
- End
- Begin Image Image1
- Height = 525
- Index = 0
- Left = 2220
- Picture = LEDSTYLE.FRX:0000
- Top = 240
- Width = 300
- End
- Begin Image Image1
- Height = 525
- Index = 1
- Left = 2220
- Picture = LEDSTYLE.FRX:021E
- Top = 780
- Width = 300
- End
- Begin Image Image1
- Height = 525
- Index = 2
- Left = 2220
- Picture = LEDSTYLE.FRX:043C
- Top = 1320
- Width = 300
- End
- Begin Image Image1
- Height = 525
- Index = 3
- Left = 2220
- Picture = LEDSTYLE.FRX:065A
- Top = 1860
- Width = 300
- End
- Begin Image Image1
- Height = 525
- Index = 4
- Left = 2220
- Picture = LEDSTYLE.FRX:0878
- Top = 2400
- Width = 300
- End
- Begin Image Image1
- Height = 525
- Index = 5
- Left = 2220
- Picture = LEDSTYLE.FRX:0A96
- Top = 2940
- Width = 300
- End
- End
- Begin Frame Frame4
- BackColor = &H00C0C0C0&
- Caption = "Bitmap Style Choices"
- Height = 3630
- Left = 3105
- TabIndex = 7
- Top = 1290
- Width = 3885
- Begin Image Image2
- Height = 420
- Index = 0
- Left = 870
- Picture = LEDSTYLE.FRX:0CB4
- Top = 1365
- Width = 360
- End
- Begin Image Image2
- Height = 420
- Index = 1
- Left = 1530
- Picture = LEDSTYLE.FRX:0E7E
- Top = 1365
- Width = 360
- End
- Begin Image Image2
- Height = 420
- Index = 2
- Left = 2190
- Picture = LEDSTYLE.FRX:1048
- Top = 1365
- Width = 360
- End
- Begin Image Image2
- Height = 420
- Index = 3
- Left = 2850
- Picture = LEDSTYLE.FRX:1212
- Top = 1365
- Width = 360
- End
- Begin Image Image2
- Height = 300
- Index = 4
- Left = 90
- Picture = LEDSTYLE.FRX:13DC
- Top = 300
- Width = 525
- End
- Begin Image Image2
- Height = 300
- Index = 5
- Left = 750
- Picture = LEDSTYLE.FRX:1AE6
- Top = 300
- Width = 525
- End
- Begin Image Image2
- Height = 300
- Index = 6
- Left = 1410
- Picture = LEDSTYLE.FRX:1CF0
- Top = 300
- Width = 525
- End
- Begin Image Image2
- Height = 300
- Index = 7
- Left = 2070
- Picture = LEDSTYLE.FRX:1EFA
- Top = 300
- Width = 525
- End
- Begin Image Image2
- Height = 300
- Index = 8
- Left = 2610
- Picture = LEDSTYLE.FRX:2104
- Top = 300
- Width = 525
- End
- Begin Image Image2
- Height = 300
- Index = 9
- Left = 3210
- Picture = LEDSTYLE.FRX:230E
- Top = 300
- Width = 525
- End
- Begin Image Image2
- Height = 525
- Index = 10
- Left = 210
- Picture = LEDSTYLE.FRX:2518
- Top = 660
- Width = 300
- End
- Begin Image Image2
- Height = 525
- Index = 11
- Left = 870
- Picture = LEDSTYLE.FRX:2736
- Top = 660
- Width = 300
- End
- Begin Image Image2
- Height = 525
- Index = 12
- Left = 1530
- Picture = LEDSTYLE.FRX:2954
- Top = 660
- Width = 300
- End
- Begin Image Image2
- Height = 525
- Index = 13
- Left = 2190
- Picture = LEDSTYLE.FRX:2B72
- Top = 660
- Width = 300
- End
- Begin Image Image2
- Height = 525
- Index = 14
- Left = 2760
- Picture = LEDSTYLE.FRX:2D90
- Top = 690
- Width = 300
- End
- Begin Image Image2
- Height = 525
- Index = 15
- Left = 3360
- Picture = LEDSTYLE.FRX:2FAE
- Top = 690
- Width = 300
- End
- Begin Image Image2
- Height = 600
- Index = 16
- Left = 885
- Picture = LEDSTYLE.FRX:31CC
- Top = 1965
- Width = 300
- End
- Begin Image Image2
- Height = 600
- Index = 17
- Left = 1545
- Picture = LEDSTYLE.FRX:3426
- Top = 1965
- Width = 300
- End
- Begin Image Image2
- Height = 300
- Index = 18
- Left = 2115
- Picture = LEDSTYLE.FRX:3680
- Top = 2085
- Width = 600
- End
- Begin Image Image2
- Height = 300
- Index = 19
- Left = 2775
- Picture = LEDSTYLE.FRX:388A
- Top = 2085
- Width = 600
- End
- Begin Image Image2
- Height = 555
- Index = 20
- Left = 2775
- Picture = LEDSTYLE.FRX:3A94
- Top = 2625
- Width = 495
- End
- Begin Image Image2
- Height = 555
- Index = 21
- Left = 2265
- Picture = LEDSTYLE.FRX:3DF2
- Top = 2625
- Width = 495
- End
- Begin Image Image2
- Height = 795
- Index = 22
- Left = 1515
- Picture = LEDSTYLE.FRX:4150
- Top = 2595
- Width = 390
- End
- Begin Image Image2
- Height = 795
- Index = 23
- Left = 855
- Picture = LEDSTYLE.FRX:451A
- Top = 2595
- Width = 390
- End
- End
- Begin LED LED1
- AutoRedraw = -1 'True
- AutoSize = 1 ' 1 - Size Control
- AVersion = 2.5
- BackColor = &H00C0C0C0&
- BevelInner = 1 ' 1 - Raised
- BevelOuter = 2 ' 2 - Inset
- BevelWidth = 2
- BorderHorizontal= 10
- BorderVertical = 5
- BorderWidth = 2
- DecayRate = 0
- Direction = 0 ' 0 - Forward
- Height = 855
- LEDHeight = 35
- LEDIndex = 0
- LEDSep = 5
- LEDStyle = 2 ' 2 - Bitmap
- LEDWidth = 20
- Left = 300
- MaxDecay = 0 'False
- Mode = 1 ' 1 - Bitwise
- MouseControl = -1 'True
- NumLEDs = 12
- OffPictureGreen = LEDSTYLE.FRX:48E4
- OffPictureRed = LEDSTYLE.FRX:4B02
- OffPictureYellow= LEDSTYLE.FRX:4D20
- OnPictureGreen = LEDSTYLE.FRX:4F3E
- OnPictureRed = LEDSTYLE.FRX:515C
- OnPictureYellow = LEDSTYLE.FRX:537A
- Orientation = 0 ' 0 - Horizontal
- TabIndex = 0
- Top = 300
- Value = 2730
- Width = 4905
- ZLoad = LEDSTYLE.FRX:5598
- End
- Begin Label Label3
- BackStyle = 0 'Transparent
- Caption = "Click on LED to change LEDStatus (On or OFF)"
- Height = 195
- Left = 315
- TabIndex = 1
- Top = 60
- Width = 4575
- End
- Dim flag As Integer
- Dim LEDIndex As Integer
- Dim imageid(6) As Integer
- Sub Form_Load ()
- flag = 0
- hscroll1(0) = led1.LEDHeight
- hscroll1(1) = led1.LEDWidth
- 'set up all the image ids
- imageid(0) = 13
- imageid(1) = 12
- imageid(2) = 15
- imageid(3) = 14
- imageid(4) = 11
- imageid(5) = 10
- End Sub
- Sub HScroll1_Change (index As Integer)
- Select Case index
- Case 0
- led1.LEDHeight = hscroll1(index)
- Case 1
- led1.LEDWidth = hscroll1(index)
- End Select
- label1(index) = hscroll1(index)
- End Sub
- Sub HScroll1_Scroll (index As Integer)
- Select Case index
- Case 0
- led1.LEDHeight = hscroll1(index)
- Case 1
- led1.LEDWidth = hscroll1(index)
- Case 2
- led1.LEDIndex = hscroll1(index)
- DoEvents
- If led1.LEDStatus = 1 Then
- led1.LEDStatus = 0
- Else
- led1.LEDStatus = 1
- End If
- End Select
- label1(index) = hscroll1(index)
- End Sub
- Sub Image1_Click (index As Integer)
- option2(index) = True
- End Sub
- Sub Image2_Click (index As Integer)
- image1(flag).Picture = image2(index).Picture
- image2(imageid(flag)).Visible = True
- Select Case flag
- Case 0
- led1.OnPictureRed = image1(flag).Picture
- Case 1
- led1.OffPictureRed = image1(flag).Picture
- Case 2
- led1.OnPictureYellow = image1(flag).Picture
- Case 3
- led1.OffPictureYellow = image1(flag).Picture
- Case 4
- led1.OnPictureGreen = image1(flag).Picture
- Case 5
- led1.OffPictureGreen = image1(flag).Picture
- End Select
- imageid(flag) = index
- End Sub
- Sub LED1_Click ()
- LEDIndex = led1.LEDIndex
- End Sub
- Sub Option2_Click (index As Integer)
- oldflag = flag
- flag = index
- image2(imageid(oldflag)).Visible = True
- End Sub
- Sub Timer1_Timer ()
-
- If image2(imageid(flag)).Visible = True Then
- image2(imageid(flag)).Visible = False
- Else
- image2(imageid(flag)).Visible = True
- End If
- End Sub
-