| |

VerySource

 Forgot password?
 Register
Search
View: 831|Reply: 6

How are the 16z basic colors represented in vb, those of vbYellow?

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-3-12 13:00:01
| Show all posts |Read mode
How are the 16z basic colors represented in vb, those of vbYellow?
I know cmdColor (0) .BackColor = vbYellow. What about the others?
Reply

Use magic Report

0

Threads

9

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-6-6 23:45:01
| Show all posts
Just look at it with ColorConstants, such as
ColorConstants.vbBlack
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-6-11 00:15:01
| Show all posts
No 16!
Reply

Use magic Report

0

Threads

9

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 China

Post time: 2020-6-12 16:45:01
| Show all posts
There are only 8 ColorConstants constants, and 16 colors with QBColor function. The parameter range of QBcolor is 0-15, a total of 16 colors.
Reply

Use magic Report

0

Threads

14

Posts

14.00

Credits

Newbie

Rank: 1

Credits
14.00

 China

Post time: 2020-6-20 10:30:01
| Show all posts
Use the other 8 types in QBColor to use RGB function
Reply

Use magic Report

0

Threads

14

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 Japan

Post time: 2020-7-15 00:45:01
| Show all posts
QBColor function
      

Returns a Long, the RGB code used to represent the corresponding number of colors.

grammar

QBColor(color)

The color argument is necessary. It is an integer between 0 and 15.

Set value

The color parameter has the following settings:

Value color value color
0 black 8 gray
1 blue 9 light blue
2 green 10 light green
3 Cyan 11 Light blue
4 red 12 light red
5 fuchsia 13 light fuchsia
6 yellow 14 light yellow
7 light gray 15 white



caution

The color parameter represents: the color value used in the earlier versions of Basic (such as Microsoft Visual Basic for MS-DOS and Basic Compiler), starting from the least significant byte, the return value will become the relevant color used by VBA The value is the value representing the three primary colors of red, green, and blue in the RGB system.
Reply

Use magic Report

0

Threads

14

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 United States

Post time: 2020-7-15 03:00:02
| Show all posts
Color constant
   

The following constants can be used anywhere in your code to replace actual values:

Constant Value Description
vbBlack 0x0 black
vbRed 0xFF red
vbGreen 0xFF00 green
vbYellow 0xFFFF yellow
vbBlue 0xFF0000 blue
vbMagenta 0xFF00FF fuchsia
vbCyan 0xFFFF00 blue green
vbWhite 0xFFFFFF white
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list