|
|
|
|
|
|
|
More on Scroll Bars
We'll develop a program here which demonstrates how colours work on your machine. Firstly, you need to be aware that the colours that you see have three components: red, green and blue. Each colour is given an intensity value - a number between 0 and 255 - and the colour that you see will depend on the mix of these three values.
The form that we're going to use will look like this:
- you need to build it according to the following specification
|
|
Form |
Name
Caption
Height
Left
Top
Width |
frmRGB
RGB Values
5000
2500
1500
6000
|
|
Command Button |
Name
Caption
Height
Left
Top
Width |
cmdExit
E&xit
495
4200
3600
1215
|
|
Label |
Name
Border Style
Caption
Height
Left
Top
Width |
lblDisplay
Fixed Single
none
1935
1560
1080
1575
|
|
Label |
Name
Border Style
Caption
Height
Left
Top
Width |
lblBlue
Fixed Single
none
495
2500
2520
615
|
|
Label |
Name
Border Style
Caption
Height
Left
Top
Width |
lblGreen
Fixed Single
none
495
2500
1800
615
|
|
Label |
Name
Border Style
Caption
Height
Left
Top
Width |
lblRed
Fixed Single
none
495
600
1080
615
|
|
Label |
Name
Alignment
Caption
Height
Left
Top
Width |
lblRedScroll
Center
Red
255
4200
840
1215
|
|
Label |
Name
Alignment
Caption
Height
Left
Top
Width |
lblGreenScroll
Center
Green
255
4200
1680
1215
|
|
Label |
Name
Alignment
Caption
Height
Left
Top
Width |
lblBlueScroll
Center
Blue
255
4200
2520
1215
|
|
Horizontal Scroll Bar |
Name
Height
Large Change
Left
Max
Top
Width |
hsbRed
255
10
4200
255
1080
1215
|
|
Horizontal Scroll Bar |
Name
Height
Large Change
Left
Max
Top
Width |
hsbGreen
255
10
4200
255
1920
1215
|
|
Horizontal Scroll Bar |
Name
Height
Large Change
Left
Max
Top
Width |
hsbBlue
255
10
4200
255
2760
1215
|
|
Text Box |
Name
Height
Left
Text
Top
Width |
txtRedValue
285
3360
none
1080
615
|
|
Text Box |
Name
Height
Left
Text
Top
Width |
txtGreenValue
285
3360
none
1920
615
|
|
Text Box |
Name
Height
Left
Text
Top
Width |
txtBlueValue
285
3360
none
2760
615
|
|
Continued...
|
|
© ePublish Scotland 1999
|