home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / VBASIC / LEDVB25.ZIP / VB.ZIP / LEDSTYLE.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-01-17  |  16.8 KB  |  540 lines

  1. VERSION 2.00
  2. Begin Form LEDStyles 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "LED Custom Bitmaps"
  6.    ClientHeight    =   6180
  7.    ClientLeft      =   3645
  8.    ClientTop       =   1740
  9.    ClientWidth     =   7185
  10.    Height          =   6585
  11.    Left            =   3585
  12.    LinkTopic       =   "Form1"
  13.    MDIChild        =   -1  'True
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   6180
  16.    ScaleWidth      =   7185
  17.    Top             =   1395
  18.    Width           =   7305
  19.    Begin Timer Timer1 
  20.       Interval        =   500
  21.       Left            =   4035
  22.       Top             =   5235
  23.    End
  24.    Begin Frame Frame1 
  25.       BackColor       =   &H00C0C0C0&
  26.       Caption         =   "LED Size Properties"
  27.       Height          =   1050
  28.       Left            =   165
  29.       TabIndex        =   12
  30.       Top             =   4965
  31.       Width           =   3660
  32.       Begin HScrollBar HScroll1 
  33.          Height          =   285
  34.          Index           =   1
  35.          Left            =   1365
  36.          Max             =   50
  37.          TabIndex        =   14
  38.          Top             =   660
  39.          Width           =   1575
  40.       End
  41.       Begin HScrollBar HScroll1 
  42.          Height          =   285
  43.          Index           =   0
  44.          Left            =   1365
  45.          Max             =   50
  46.          TabIndex        =   13
  47.          Top             =   375
  48.          Width           =   1575
  49.       End
  50.       Begin Label Label1 
  51.          Alignment       =   1  'Right Justify
  52.          AutoSize        =   -1  'True
  53.          BackColor       =   &H00C0C0C0&
  54.          Caption         =   "LEDWidth :"
  55.          Height          =   195
  56.          Index           =   3
  57.          Left            =   345
  58.          TabIndex        =   11
  59.          Top             =   720
  60.          Width           =   990
  61.       End
  62.       Begin Label Label1 
  63.          AutoSize        =   -1  'True
  64.          BackColor       =   &H00C0C0C0&
  65.          Caption         =   "LEDHeight :"
  66.          Height          =   195
  67.          Index           =   2
  68.          Left            =   285
  69.          TabIndex        =   10
  70.          Top             =   435
  71.          Width           =   1050
  72.       End
  73.       Begin Label Label1 
  74.          AutoSize        =   -1  'True
  75.          BackColor       =   &H00C0C0C0&
  76.          Caption         =   "0"
  77.          Height          =   195
  78.          Index           =   1
  79.          Left            =   2970
  80.          TabIndex        =   16
  81.          Top             =   720
  82.          Width           =   120
  83.       End
  84.       Begin Label Label1 
  85.          AutoSize        =   -1  'True
  86.          BackColor       =   &H00C0C0C0&
  87.          Caption         =   "0"
  88.          Height          =   195
  89.          Index           =   0
  90.          Left            =   2985
  91.          TabIndex        =   15
  92.          Top             =   435
  93.          Width           =   120
  94.       End
  95.    End
  96.    Begin Frame Frame3 
  97.       BackColor       =   &H00C0C0C0&
  98.       Caption         =   "LED State/Color Properties"
  99.       Height          =   3615
  100.       Left            =   165
  101.       TabIndex        =   8
  102.       Top             =   1290
  103.       Width           =   2865
  104.       Begin OptionButton Option2 
  105.          BackColor       =   &H00C0C0C0&
  106.          Caption         =   "Red On Picture"
  107.          Height          =   225
  108.          Index           =   0
  109.          Left            =   195
  110.          TabIndex        =   2
  111.          Top             =   420
  112.          Value           =   -1  'True
  113.          Width           =   1965
  114.       End
  115.       Begin OptionButton Option2 
  116.          BackColor       =   &H00C0C0C0&
  117.          Caption         =   "Red Off Picture"
  118.          Height          =   225
  119.          Index           =   1
  120.          Left            =   195
  121.          TabIndex        =   3
  122.          Top             =   930
  123.          Width           =   1965
  124.       End
  125.       Begin OptionButton Option2 
  126.          BackColor       =   &H00C0C0C0&
  127.          Caption         =   "Yellow On Picture"
  128.          Height          =   225
  129.          Index           =   2
  130.          Left            =   195
  131.          TabIndex        =   4
  132.          Top             =   1470
  133.          Width           =   1965
  134.       End
  135.       Begin OptionButton Option2 
  136.          BackColor       =   &H00C0C0C0&
  137.          Caption         =   "Yellow Off Picture"
  138.          Height          =   225
  139.          Index           =   3
  140.          Left            =   195
  141.          TabIndex        =   5
  142.          Top             =   2040
  143.          Width           =   1965
  144.       End
  145.       Begin OptionButton Option2 
  146.          BackColor       =   &H00C0C0C0&
  147.          Caption         =   "Green On Picture"
  148.          Height          =   225
  149.          Index           =   4
  150.          Left            =   195
  151.          TabIndex        =   6
  152.          Top             =   2580
  153.          Width           =   1965
  154.       End
  155.       Begin OptionButton Option2 
  156.          BackColor       =   &H00C0C0C0&
  157.          Caption         =   "Green Off Picture"
  158.          Height          =   225
  159.          Index           =   5
  160.          Left            =   195
  161.          TabIndex        =   9
  162.          Top             =   3120
  163.          Width           =   1965
  164.       End
  165.       Begin Image Image1 
  166.          Height          =   525
  167.          Index           =   0
  168.          Left            =   2220
  169.          Picture         =   LEDSTYLE.FRX:0000
  170.          Top             =   240
  171.          Width           =   300
  172.       End
  173.       Begin Image Image1 
  174.          Height          =   525
  175.          Index           =   1
  176.          Left            =   2220
  177.          Picture         =   LEDSTYLE.FRX:021E
  178.          Top             =   780
  179.          Width           =   300
  180.       End
  181.       Begin Image Image1 
  182.          Height          =   525
  183.          Index           =   2
  184.          Left            =   2220
  185.          Picture         =   LEDSTYLE.FRX:043C
  186.          Top             =   1320
  187.          Width           =   300
  188.       End
  189.       Begin Image Image1 
  190.          Height          =   525
  191.          Index           =   3
  192.          Left            =   2220
  193.          Picture         =   LEDSTYLE.FRX:065A
  194.          Top             =   1860
  195.          Width           =   300
  196.       End
  197.       Begin Image Image1 
  198.          Height          =   525
  199.          Index           =   4
  200.          Left            =   2220
  201.          Picture         =   LEDSTYLE.FRX:0878
  202.          Top             =   2400
  203.          Width           =   300
  204.       End
  205.       Begin Image Image1 
  206.          Height          =   525
  207.          Index           =   5
  208.          Left            =   2220
  209.          Picture         =   LEDSTYLE.FRX:0A96
  210.          Top             =   2940
  211.          Width           =   300
  212.       End
  213.    End
  214.    Begin Frame Frame4 
  215.       BackColor       =   &H00C0C0C0&
  216.       Caption         =   "Bitmap Style Choices"
  217.       Height          =   3630
  218.       Left            =   3105
  219.       TabIndex        =   7
  220.       Top             =   1290
  221.       Width           =   3885
  222.       Begin Image Image2 
  223.          Height          =   420
  224.          Index           =   0
  225.          Left            =   870
  226.          Picture         =   LEDSTYLE.FRX:0CB4
  227.          Top             =   1365
  228.          Width           =   360
  229.       End
  230.       Begin Image Image2 
  231.          Height          =   420
  232.          Index           =   1
  233.          Left            =   1530
  234.          Picture         =   LEDSTYLE.FRX:0E7E
  235.          Top             =   1365
  236.          Width           =   360
  237.       End
  238.       Begin Image Image2 
  239.          Height          =   420
  240.          Index           =   2
  241.          Left            =   2190
  242.          Picture         =   LEDSTYLE.FRX:1048
  243.          Top             =   1365
  244.          Width           =   360
  245.       End
  246.       Begin Image Image2 
  247.          Height          =   420
  248.          Index           =   3
  249.          Left            =   2850
  250.          Picture         =   LEDSTYLE.FRX:1212
  251.          Top             =   1365
  252.          Width           =   360
  253.       End
  254.       Begin Image Image2 
  255.          Height          =   300
  256.          Index           =   4
  257.          Left            =   90
  258.          Picture         =   LEDSTYLE.FRX:13DC
  259.          Top             =   300
  260.          Width           =   525
  261.       End
  262.       Begin Image Image2 
  263.          Height          =   300
  264.          Index           =   5
  265.          Left            =   750
  266.          Picture         =   LEDSTYLE.FRX:1AE6
  267.          Top             =   300
  268.          Width           =   525
  269.       End
  270.       Begin Image Image2 
  271.          Height          =   300
  272.          Index           =   6
  273.          Left            =   1410
  274.          Picture         =   LEDSTYLE.FRX:1CF0
  275.          Top             =   300
  276.          Width           =   525
  277.       End
  278.       Begin Image Image2 
  279.          Height          =   300
  280.          Index           =   7
  281.          Left            =   2070
  282.          Picture         =   LEDSTYLE.FRX:1EFA
  283.          Top             =   300
  284.          Width           =   525
  285.       End
  286.       Begin Image Image2 
  287.          Height          =   300
  288.          Index           =   8
  289.          Left            =   2610
  290.          Picture         =   LEDSTYLE.FRX:2104
  291.          Top             =   300
  292.          Width           =   525
  293.       End
  294.       Begin Image Image2 
  295.          Height          =   300
  296.          Index           =   9
  297.          Left            =   3210
  298.          Picture         =   LEDSTYLE.FRX:230E
  299.          Top             =   300
  300.          Width           =   525
  301.       End
  302.       Begin Image Image2 
  303.          Height          =   525
  304.          Index           =   10
  305.          Left            =   210
  306.          Picture         =   LEDSTYLE.FRX:2518
  307.          Top             =   660
  308.          Width           =   300
  309.       End
  310.       Begin Image Image2 
  311.          Height          =   525
  312.          Index           =   11
  313.          Left            =   870
  314.          Picture         =   LEDSTYLE.FRX:2736
  315.          Top             =   660
  316.          Width           =   300
  317.       End
  318.       Begin Image Image2 
  319.          Height          =   525
  320.          Index           =   12
  321.          Left            =   1530
  322.          Picture         =   LEDSTYLE.FRX:2954
  323.          Top             =   660
  324.          Width           =   300
  325.       End
  326.       Begin Image Image2 
  327.          Height          =   525
  328.          Index           =   13
  329.          Left            =   2190
  330.          Picture         =   LEDSTYLE.FRX:2B72
  331.          Top             =   660
  332.          Width           =   300
  333.       End
  334.       Begin Image Image2 
  335.          Height          =   525
  336.          Index           =   14
  337.          Left            =   2760
  338.          Picture         =   LEDSTYLE.FRX:2D90
  339.          Top             =   690
  340.          Width           =   300
  341.       End
  342.       Begin Image Image2 
  343.          Height          =   525
  344.          Index           =   15
  345.          Left            =   3360
  346.          Picture         =   LEDSTYLE.FRX:2FAE
  347.          Top             =   690
  348.          Width           =   300
  349.       End
  350.       Begin Image Image2 
  351.          Height          =   600
  352.          Index           =   16
  353.          Left            =   885
  354.          Picture         =   LEDSTYLE.FRX:31CC
  355.          Top             =   1965
  356.          Width           =   300
  357.       End
  358.       Begin Image Image2 
  359.          Height          =   600
  360.          Index           =   17
  361.          Left            =   1545
  362.          Picture         =   LEDSTYLE.FRX:3426
  363.          Top             =   1965
  364.          Width           =   300
  365.       End
  366.       Begin Image Image2 
  367.          Height          =   300
  368.          Index           =   18
  369.          Left            =   2115
  370.          Picture         =   LEDSTYLE.FRX:3680
  371.          Top             =   2085
  372.          Width           =   600
  373.       End
  374.       Begin Image Image2 
  375.          Height          =   300
  376.          Index           =   19
  377.          Left            =   2775
  378.          Picture         =   LEDSTYLE.FRX:388A
  379.          Top             =   2085
  380.          Width           =   600
  381.       End
  382.       Begin Image Image2 
  383.          Height          =   555
  384.          Index           =   20
  385.          Left            =   2775
  386.          Picture         =   LEDSTYLE.FRX:3A94
  387.          Top             =   2625
  388.          Width           =   495
  389.       End
  390.       Begin Image Image2 
  391.          Height          =   555
  392.          Index           =   21
  393.          Left            =   2265
  394.          Picture         =   LEDSTYLE.FRX:3DF2
  395.          Top             =   2625
  396.          Width           =   495
  397.       End
  398.       Begin Image Image2 
  399.          Height          =   795
  400.          Index           =   22
  401.          Left            =   1515
  402.          Picture         =   LEDSTYLE.FRX:4150
  403.          Top             =   2595
  404.          Width           =   390
  405.       End
  406.       Begin Image Image2 
  407.          Height          =   795
  408.          Index           =   23
  409.          Left            =   855
  410.          Picture         =   LEDSTYLE.FRX:451A
  411.          Top             =   2595
  412.          Width           =   390
  413.       End
  414.    End
  415.    Begin LED LED1 
  416.       AutoRedraw      =   -1  'True
  417.       AutoSize        =   1  ' 1 - Size Control
  418.       AVersion        =   2.5
  419.       BackColor       =   &H00C0C0C0&
  420.       BevelInner      =   1  ' 1 - Raised
  421.       BevelOuter      =   2  ' 2 - Inset
  422.       BevelWidth      =   2
  423.       BorderHorizontal=   10
  424.       BorderVertical  =   5
  425.       BorderWidth     =   2
  426.       DecayRate       =   0
  427.       Direction       =   0  ' 0 - Forward
  428.       Height          =   855
  429.       LEDHeight       =   35
  430.       LEDIndex        =   0
  431.       LEDSep          =   5
  432.       LEDStyle        =   2  ' 2 - Bitmap
  433.       LEDWidth        =   20
  434.       Left            =   300
  435.       MaxDecay        =   0   'False
  436.       Mode            =   1  ' 1 - Bitwise
  437.       MouseControl    =   -1  'True
  438.       NumLEDs         =   12
  439.       OffPictureGreen =   LEDSTYLE.FRX:48E4
  440.       OffPictureRed   =   LEDSTYLE.FRX:4B02
  441.       OffPictureYellow=   LEDSTYLE.FRX:4D20
  442.       OnPictureGreen  =   LEDSTYLE.FRX:4F3E
  443.       OnPictureRed    =   LEDSTYLE.FRX:515C
  444.       OnPictureYellow =   LEDSTYLE.FRX:537A
  445.       Orientation     =   0  ' 0 - Horizontal
  446.       TabIndex        =   0
  447.       Top             =   300
  448.       Value           =   2730
  449.       Width           =   4905
  450.       ZLoad           =   LEDSTYLE.FRX:5598
  451.    End
  452.    Begin Label Label3 
  453.       BackStyle       =   0  'Transparent
  454.       Caption         =   "Click on LED to change LEDStatus (On or OFF)"
  455.       Height          =   195
  456.       Left            =   315
  457.       TabIndex        =   1
  458.       Top             =   60
  459.       Width           =   4575
  460.    End
  461. Dim flag As Integer
  462. Dim LEDIndex As Integer
  463. Dim imageid(6) As Integer
  464. Sub Form_Load ()
  465.     flag = 0
  466.     hscroll1(0) = led1.LEDHeight
  467.     hscroll1(1) = led1.LEDWidth
  468.     'set up all the image ids
  469.     imageid(0) = 13
  470.     imageid(1) = 12
  471.     imageid(2) = 15
  472.     imageid(3) = 14
  473.     imageid(4) = 11
  474.     imageid(5) = 10
  475. End Sub
  476. Sub HScroll1_Change (index As Integer)
  477.     Select Case index
  478.         Case 0
  479.             led1.LEDHeight = hscroll1(index)
  480.         Case 1
  481.             led1.LEDWidth = hscroll1(index)
  482.     End Select
  483.     label1(index) = hscroll1(index)
  484. End Sub
  485. Sub HScroll1_Scroll (index As Integer)
  486.     Select Case index
  487.         Case 0
  488.             led1.LEDHeight = hscroll1(index)
  489.         Case 1
  490.             led1.LEDWidth = hscroll1(index)
  491.         Case 2
  492.             led1.LEDIndex = hscroll1(index)
  493.             DoEvents
  494.             If led1.LEDStatus = 1 Then
  495.                 led1.LEDStatus = 0
  496.             Else
  497.                 led1.LEDStatus = 1
  498.             End If
  499.     End Select
  500.     label1(index) = hscroll1(index)
  501. End Sub
  502. Sub Image1_Click (index As Integer)
  503.     option2(index) = True
  504. End Sub
  505. Sub Image2_Click (index As Integer)
  506.     image1(flag).Picture = image2(index).Picture
  507.     image2(imageid(flag)).Visible = True
  508.     Select Case flag
  509.         Case 0
  510.             led1.OnPictureRed = image1(flag).Picture
  511.         Case 1
  512.             led1.OffPictureRed = image1(flag).Picture
  513.         Case 2
  514.             led1.OnPictureYellow = image1(flag).Picture
  515.         Case 3
  516.             led1.OffPictureYellow = image1(flag).Picture
  517.         Case 4
  518.             led1.OnPictureGreen = image1(flag).Picture
  519.         Case 5
  520.             led1.OffPictureGreen = image1(flag).Picture
  521.     End Select
  522.     imageid(flag) = index
  523. End Sub
  524. Sub LED1_Click ()
  525.     LEDIndex = led1.LEDIndex
  526. End Sub
  527. Sub Option2_Click (index As Integer)
  528.     oldflag = flag
  529.     flag = index
  530.     image2(imageid(oldflag)).Visible = True
  531. End Sub
  532. Sub Timer1_Timer ()
  533.             
  534.     If image2(imageid(flag)).Visible = True Then
  535.         image2(imageid(flag)).Visible = False
  536.     Else
  537.         image2(imageid(flag)).Visible = True
  538.     End If
  539. End Sub
  540.