home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / ch_code / ch05 / colors / colors.frm (.txt) next >
Encoding:
Visual Basic Form  |  1996-06-05  |  8.5 KB  |  260 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "Colors"
  4.    ClientHeight    =   4425
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   6240
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   4425
  10.    ScaleWidth      =   6240
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.PictureBox Picture2 
  13.       BackColor       =   &H00808080&
  14.       Height          =   1815
  15.       Left            =   3270
  16.       ScaleHeight     =   1755
  17.       ScaleWidth      =   2535
  18.       TabIndex        =   7
  19.       Top             =   240
  20.       Width           =   2595
  21.       Begin VB.Label Label4 
  22.          BackStyle       =   0  'Transparent
  23.          Caption         =   "Red = 128"
  24.          BeginProperty Font 
  25.             Name            =   "Verdana"
  26.             Size            =   9
  27.             Charset         =   0
  28.             Weight          =   700
  29.             Underline       =   0   'False
  30.             Italic          =   0   'False
  31.             Strikethrough   =   0   'False
  32.          EndProperty
  33.          Height          =   255
  34.          Left            =   120
  35.          TabIndex        =   10
  36.          Top             =   120
  37.          Width           =   1125
  38.       End
  39.       Begin VB.Label Label5 
  40.          BackStyle       =   0  'Transparent
  41.          Caption         =   "Green = 128"
  42.          BeginProperty Font 
  43.             Name            =   "Verdana"
  44.             Size            =   9
  45.             Charset         =   0
  46.             Weight          =   700
  47.             Underline       =   0   'False
  48.             Italic          =   0   'False
  49.             Strikethrough   =   0   'False
  50.          EndProperty
  51.          Height          =   255
  52.          Left            =   120
  53.          TabIndex        =   9
  54.          Top             =   360
  55.          Width           =   1335
  56.       End
  57.       Begin VB.Label Label6 
  58.          BackStyle       =   0  'Transparent
  59.          Caption         =   "Blue = 128"
  60.          BeginProperty Font 
  61.             Name            =   "Verdana"
  62.             Size            =   9
  63.             Charset         =   0
  64.             Weight          =   700
  65.             Underline       =   0   'False
  66.             Italic          =   0   'False
  67.             Strikethrough   =   0   'False
  68.          EndProperty
  69.          Height          =   255
  70.          Left            =   120
  71.          TabIndex        =   8
  72.          Top             =   600
  73.          Width           =   1215
  74.       End
  75.    End
  76.    Begin VB.PictureBox Picture1 
  77.       BackColor       =   &H00808080&
  78.       BeginProperty Font 
  79.          Name            =   "Verdana"
  80.          Size            =   9
  81.          Charset         =   0
  82.          Weight          =   400
  83.          Underline       =   0   'False
  84.          Italic          =   0   'False
  85.          Strikethrough   =   0   'False
  86.       EndProperty
  87.       Height          =   1815
  88.       Left            =   240
  89.       ScaleHeight     =   1755
  90.       ScaleWidth      =   2535
  91.       TabIndex        =   3
  92.       Top             =   240
  93.       Width           =   2595
  94.       Begin VB.Label Label3 
  95.          BackStyle       =   0  'Transparent
  96.          Caption         =   "Blue = 128"
  97.          BeginProperty Font 
  98.             Name            =   "Verdana"
  99.             Size            =   9
  100.             Charset         =   0
  101.             Weight          =   700
  102.             Underline       =   0   'False
  103.             Italic          =   0   'False
  104.             Strikethrough   =   0   'False
  105.          EndProperty
  106.          Height          =   255
  107.          Left            =   120
  108.          TabIndex        =   6
  109.          Top             =   600
  110.          Width           =   1215
  111.       End
  112.       Begin VB.Label Label2 
  113.          BackStyle       =   0  'Transparent
  114.          Caption         =   "Green = 128"
  115.          BeginProperty Font 
  116.             Name            =   "Verdana"
  117.             Size            =   9
  118.             Charset         =   0
  119.             Weight          =   700
  120.             Underline       =   0   'False
  121.             Italic          =   0   'False
  122.             Strikethrough   =   0   'False
  123.          EndProperty
  124.          Height          =   255
  125.          Left            =   120
  126.          TabIndex        =   5
  127.          Top             =   360
  128.          Width           =   1335
  129.       End
  130.       Begin VB.Label Label1 
  131.          BackStyle       =   0  'Transparent
  132.          Caption         =   "Red = 128"
  133.          BeginProperty Font 
  134.             Name            =   "Verdana"
  135.             Size            =   9
  136.             Charset         =   0
  137.             Weight          =   700
  138.             Underline       =   0   'False
  139.             Italic          =   0   'False
  140.             Strikethrough   =   0   'False
  141.          EndProperty
  142.          Height          =   255
  143.          Left            =   120
  144.          TabIndex        =   4
  145.          Top             =   120
  146.          Width           =   1095
  147.       End
  148.    End
  149.    Begin VB.HScrollBar HScroll3 
  150.       Height          =   255
  151.       LargeChange     =   10
  152.       Left            =   240
  153.       Max             =   255
  154.       TabIndex        =   2
  155.       Top             =   3840
  156.       Value           =   128
  157.       Width           =   5655
  158.    End
  159.    Begin VB.HScrollBar HScroll2 
  160.       Height          =   255
  161.       LargeChange     =   10
  162.       Left            =   240
  163.       Max             =   255
  164.       TabIndex        =   1
  165.       Top             =   3120
  166.       Value           =   128
  167.       Width           =   5655
  168.    End
  169.    Begin VB.HScrollBar HScroll1 
  170.       Height          =   255
  171.       LargeChange     =   10
  172.       Left            =   240
  173.       Max             =   255
  174.       TabIndex        =   0
  175.       Top             =   2400
  176.       Value           =   128
  177.       Width           =   5655
  178.    End
  179.    Begin VB.Label Label9 
  180.       Caption         =   "Blue Component"
  181.       BeginProperty Font 
  182.          Name            =   "Verdana"
  183.          Size            =   9
  184.          Charset         =   0
  185.          Weight          =   400
  186.          Underline       =   0   'False
  187.          Italic          =   0   'False
  188.          Strikethrough   =   0   'False
  189.       EndProperty
  190.       Height          =   195
  191.       Left            =   240
  192.       TabIndex        =   13
  193.       Top             =   3615
  194.       Width           =   1965
  195.    End
  196.    Begin VB.Label Label8 
  197.       Caption         =   "Green Component"
  198.       BeginProperty Font 
  199.          Name            =   "Verdana"
  200.          Size            =   9
  201.          Charset         =   0
  202.          Weight          =   400
  203.          Underline       =   0   'False
  204.          Italic          =   0   'False
  205.          Strikethrough   =   0   'False
  206.       EndProperty
  207.       Height          =   195
  208.       Left            =   240
  209.       TabIndex        =   12
  210.       Top             =   2895
  211.       Width           =   1965
  212.    End
  213.    Begin VB.Label Label7 
  214.       Caption         =   "Red Component"
  215.       BeginProperty Font 
  216.          Name            =   "Verdana"
  217.          Size            =   9
  218.          Charset         =   0
  219.          Weight          =   400
  220.          Underline       =   0   'False
  221.          Italic          =   0   'False
  222.          Strikethrough   =   0   'False
  223.       EndProperty
  224.       Height          =   195
  225.       Left            =   240
  226.       TabIndex        =   11
  227.       Top             =   2160
  228.       Width           =   1965
  229.    End
  230. Attribute VB_Name = "Form1"
  231. Attribute VB_GlobalNameSpace = False
  232. Attribute VB_Creatable = False
  233. Attribute VB_PredeclaredId = True
  234. Attribute VB_Exposed = False
  235. Option Explicit
  236. Private Sub HScroll1_Change()
  237.     Label4.Caption = "Red = " & HScroll1.Value
  238.     Picture2.BackColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
  239. End Sub
  240. Private Sub HScroll1_Scroll()
  241.     Label1.Caption = "Red = " & HScroll1.Value
  242.     Picture1.BackColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
  243. End Sub
  244. Private Sub HScroll2_Change()
  245.     Label5.Caption = "Green = " & HScroll2.Value
  246.     Picture2.BackColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
  247. End Sub
  248. Private Sub HScroll2_Scroll()
  249.     Label2.Caption = "Green = " & HScroll2.Value
  250.     Picture1.BackColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
  251. End Sub
  252. Private Sub HScroll3_Change()
  253.     Label6.Caption = "Blue = " & HScroll3.Value
  254.     Picture2.BackColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
  255. End Sub
  256. Private Sub HScroll3_Scroll()
  257.     Label3.Caption = "Blue = " & HScroll3.Value
  258.     Picture1.BackColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
  259. End Sub
  260.