Setting the BackColor PropertyYou can set the BackColor property at run-time in 2 ways.
Way 1: Using the Color's numeric value
Every color has numeric value.
You can simply assign this value to the BackColor property.
For example, The numeric value of the red color is &H000000FF&
If you want to set the Form BackColor property to red,
use the following code:
Command1.BackColor = &H000000FF&
You can find what is the numeric value of every
color by making the following simple steps:
Click on the BackColor property arrow button
in the properties window (Figure 10).
Way 1: Using the Color's numeric value
Every color has numeric value.
You can simply assign this value to the BackColor property.
For example, The numeric value of the red color is &H000000FF&
If you want to set the Form BackColor property to red,
use the following code:
Command1.BackColor = &H000000FF&
You can find what is the numeric value of every
color by making the following simple steps:
Click on the BackColor property arrow button
in the properties window (Figure 10).
Figure 10
Then click on the Palette Tab (Figure 11).
Figure 11
Select your desirable color (Figure 12).
Figure 12
The color value will be displayed in the BackColor Property cell (Figure 13).
Figure 13
And once again, if you setting a Command Button's color,
don't forget to set its Style property to 1 - Graphical.
To learn the second way, you'll have to learn
a little bit about Constants.
All of this in the next page...
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন