home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / VISUAL_B / FERRAMEN / LEDVB101 / LEDTEST.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-11-13  |  9.0 KB  |  302 lines

  1. VERSION 2.00
  2. Begin Form ledtest 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "LED Examples"
  5.    ClientHeight    =   4575
  6.    ClientLeft      =   1290
  7.    ClientTop       =   2100
  8.    ClientWidth     =   7155
  9.    Height          =   4950
  10.    Left            =   1245
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   4575
  13.    ScaleWidth      =   7155
  14.    Top             =   1770
  15.    Width           =   7245
  16.    Begin LED LED4 
  17.       AutoSize        =   -1  'True
  18.       BackColor       =   &H00C0C0C0&
  19.       BevelInner      =   0  ' 0 - None
  20.       BevelOuter      =   1  ' 1 - Raised
  21.       BevelWidth      =   2
  22.       BorderHorizontal=   2
  23.       BorderVertical  =   0
  24.       BorderWidth     =   0
  25.       Direction       =   0  ' 0 - Forward
  26.       Height          =   480
  27.       LEDHeight       =   28
  28.       LEDIndex        =   0
  29.       LEDSep          =   2
  30.       LEDStyle        =   2  ' 2 - Bitmap
  31.       LEDWidth        =   25
  32.       Left            =   240
  33.       Mode            =   0  ' 0 - Value
  34.       MouseControl    =   -1  'True
  35.       NumLEDs         =   15
  36.       OffPictureGreen =   LEDTEST.FRX:0000
  37.       OffPictureRed   =   LEDTEST.FRX:01CA
  38.       OffPictureYellow=   LEDTEST.FRX:0394
  39.       OnPictureGreen  =   LEDTEST.FRX:055E
  40.       OnPictureRed    =   LEDTEST.FRX:0728
  41.       OnPictureYellow =   LEDTEST.FRX:08F2
  42.       Orientation     =   0  ' 0 - Horizontal
  43.       TabIndex        =   15
  44.       Top             =   3930
  45.       Value           =   0
  46.       Width           =   6165
  47.    End
  48.    Begin LED LED3 
  49.       AutoSize        =   -1  'True
  50.       BackColor       =   &H00C0C0C0&
  51.       BevelInner      =   0  ' 0 - None
  52.       BevelOuter      =   2  ' 2 - Inset
  53.       BevelWidth      =   2
  54.       BorderHorizontal=   0
  55.       BorderVertical  =   2
  56.       BorderWidth     =   2
  57.       Direction       =   0  ' 0 - Forward
  58.       Height          =   600
  59.       LEDHeight       =   28
  60.       LEDIndex        =   0
  61.       LEDSep          =   0
  62.       LEDStyle        =   2  ' 2 - Bitmap
  63.       LEDWidth        =   25
  64.       Left            =   240
  65.       Mode            =   0  ' 0 - Value
  66.       MouseControl    =   0   'False
  67.       NumLEDs         =   15
  68.       OffPictureGreen =   LEDTEST.FRX:0ABC
  69.       OffPictureRed   =   LEDTEST.FRX:0C86
  70.       OffPictureYellow=   LEDTEST.FRX:0E50
  71.       OnPictureGreen  =   LEDTEST.FRX:101A
  72.       OnPictureRed    =   LEDTEST.FRX:11E4
  73.       OnPictureYellow =   LEDTEST.FRX:13AE
  74.       Orientation     =   0  ' 0 - Horizontal
  75.       TabIndex        =   14
  76.       Top             =   1140
  77.       Value           =   0
  78.       Width           =   5745
  79.    End
  80.    Begin LED LED1 
  81.       AutoSize        =   0   'False
  82.       BackColor       =   &H00C0C0C0&
  83.       BackgroundPicture=   LEDTEST.FRX:1578
  84.       BevelInner      =   0  ' 0 - None
  85.       BevelOuter      =   1  ' 1 - Raised
  86.       BevelWidth      =   2
  87.       BorderHorizontal=   20
  88.       BorderVertical  =   1
  89.       BorderWidth     =   4
  90.       Direction       =   1  ' 1 - Backward
  91.       Height          =   3315
  92.       LEDHeight       =   11
  93.       LEDIndex        =   0
  94.       LEDSep          =   0
  95.       LEDStyle        =   0  ' 0 - Rectangular
  96.       LEDWidth        =   11
  97.       Left            =   6060
  98.       Mode            =   0  ' 0 - Value
  99.       MouseControl    =   0   'False
  100.       NumLEDs         =   15
  101.       Orientation     =   1  ' 1 - Vertical
  102.       TabIndex        =   13
  103.       Top             =   270
  104.       Value           =   0
  105.       Width           =   915
  106.    End
  107.    Begin Frame Frame3 
  108.       Caption         =   "Direction"
  109.       Height          =   1155
  110.       Left            =   4110
  111.       TabIndex        =   10
  112.       Top             =   2430
  113.       Width           =   1815
  114.       Begin OptionButton Option3 
  115.          Caption         =   "Backward"
  116.          Height          =   255
  117.          Index           =   1
  118.          Left            =   300
  119.          TabIndex        =   12
  120.          Top             =   630
  121.          Width           =   1245
  122.       End
  123.       Begin OptionButton Option3 
  124.          Caption         =   "Forward"
  125.          Height          =   255
  126.          Index           =   0
  127.          Left            =   300
  128.          TabIndex        =   11
  129.          Top             =   360
  130.          Width           =   1245
  131.       End
  132.    End
  133.    Begin Frame Frame2 
  134.       Caption         =   "Mode"
  135.       Height          =   1035
  136.       Left            =   2310
  137.       TabIndex        =   6
  138.       Top             =   2460
  139.       Width           =   1695
  140.       Begin OptionButton Option2 
  141.          Caption         =   "Bitwise"
  142.          Height          =   195
  143.          Index           =   1
  144.          Left            =   360
  145.          TabIndex        =   8
  146.          Top             =   570
  147.          Width           =   1125
  148.       End
  149.       Begin OptionButton Option2 
  150.          Caption         =   "Value"
  151.          Height          =   195
  152.          Index           =   0
  153.          Left            =   360
  154.          TabIndex        =   7
  155.          Top             =   330
  156.          Width           =   1065
  157.       End
  158.    End
  159.    Begin Frame Frame1 
  160.       Caption         =   "LEDStyle"
  161.       Height          =   1365
  162.       Left            =   270
  163.       TabIndex        =   2
  164.       Top             =   2430
  165.       Width           =   1965
  166.       Begin OptionButton Option1 
  167.          Caption         =   "Bitmap"
  168.          Height          =   225
  169.          Index           =   2
  170.          Left            =   180
  171.          TabIndex        =   5
  172.          Top             =   810
  173.          Width           =   1665
  174.       End
  175.       Begin OptionButton Option1 
  176.          Caption         =   "Circular"
  177.          Height          =   225
  178.          Index           =   1
  179.          Left            =   180
  180.          TabIndex        =   4
  181.          Top             =   570
  182.          Width           =   1665
  183.       End
  184.       Begin OptionButton Option1 
  185.          Caption         =   "Rectangle"
  186.          Height          =   225
  187.          Index           =   0
  188.          Left            =   180
  189.          TabIndex        =   3
  190.          Top             =   330
  191.          Width           =   1665
  192.       End
  193.    End
  194.    Begin HScrollBar HScroll1 
  195.       Height          =   255
  196.       Left            =   570
  197.       Max             =   15
  198.       TabIndex        =   1
  199.       Top             =   1950
  200.       Width           =   5325
  201.    End
  202.    Begin LED LED2 
  203.       AutoSize        =   -1  'True
  204.       BackColor       =   &H00C0C0C0&
  205.       BevelInner      =   0  ' 0 - None
  206.       BevelOuter      =   2  ' 2 - Inset
  207.       BevelWidth      =   3
  208.       BorderHorizontal=   10
  209.       BorderVertical  =   2
  210.       BorderWidth     =   2
  211.       Direction       =   0  ' 0 - Forward
  212.       Height          =   510
  213.       LEDHeight       =   20
  214.       LEDIndex        =   0
  215.       LEDSep          =   2
  216.       LEDStyle        =   1  ' 1 - Circular
  217.       LEDWidth        =   20
  218.       Left            =   450
  219.       Mode            =   0  ' 0 - Value
  220.       MouseControl    =   0   'False
  221.       NumLEDs         =   15
  222.       Orientation     =   0  ' 0 - Horizontal
  223.       TabIndex        =   0
  224.       Top             =   510
  225.       Value           =   0
  226.       Width           =   5370
  227.    End
  228.    Begin Label Label1 
  229.       Caption         =   "Label1"
  230.       Height          =   165
  231.       Left            =   2490
  232.       TabIndex        =   9
  233.       Top             =   210
  234.       Width           =   1485
  235.    End
  236. Sub Form_Load ()
  237.     For i = 0 To 8
  238.         led1.LEDIndex = i
  239.         led1.LEDColor = 2
  240.         led2.LEDIndex = i
  241.         led2.LEDColor = 2
  242.         led3.LEDIndex = i
  243.         led3.LEDColor = 2
  244.         led4.LEDIndex = i
  245.         led4.LEDColor = 2
  246.     Next
  247.     For i = 9 To 12
  248.         led1.LEDIndex = i
  249.         led1.LEDColor = 1
  250.         led2.LEDIndex = i
  251.         led2.LEDColor = 1
  252.         led3.LEDIndex = i
  253.         led3.LEDColor = 1
  254.         led4.LEDIndex = i
  255.         led4.LEDColor = 1
  256.     Next
  257.     For i = 13 To 15
  258.         led1.LEDIndex = i
  259.         led1.LEDColor = 0
  260.         led2.LEDIndex = i
  261.         led2.LEDColor = 0
  262.         led3.LEDIndex = i
  263.         led3.LEDColor = 0
  264.         led4.LEDIndex = i
  265.         led4.LEDColor = 0
  266.     Next
  267. End Sub
  268. Sub HScroll1_Change ()
  269.     led1.Value = Hscroll1
  270.     led2.Value = Hscroll1
  271.     led3.Value = Hscroll1
  272.     led4.Value = Hscroll1
  273.     label1 = led2.Value
  274. End Sub
  275. Sub HScroll1_Scroll ()
  276.     led1.Value = Hscroll1
  277.     led2.Value = Hscroll1
  278.     led3.Value = Hscroll1
  279.     led4.Value = Hscroll1
  280.     label1 = led2.Value
  281. End Sub
  282. Sub LED4_Click ()
  283.     If led4.Value <= Hscroll1.Max Then
  284.         Hscroll1 = led4.Value
  285.     Else
  286.         label1 = led4.Value
  287.     End If
  288. End Sub
  289. Sub Option1_Click (index As Integer)
  290.     led4.LEDStyle = index
  291. End Sub
  292. Sub Option2_Click (index As Integer)
  293.     led4.Mode = index
  294.     If index = 1 Then
  295.         j = led4.NumLEDs - 1
  296.         If j > 31 Then j = 31
  297.     End If
  298. End Sub
  299. Sub Option3_Click (index As Integer)
  300.     led4.Direction = index
  301. End Sub
  302.