Gradient Control

With Gradient control you can easly paint your Forms and your PictureBoxes with Dithered colors as shown in the Bottom picture.

Example How your Form will look like after you use this Control

Be aware that the picture is misleading because its low resolution, and your form will look much better when you use this control.

To use this control you will have to put only one code line:
Gradient1.gradient The object you want to gradient, The RGB value of the Red color, The RGB value of the Green color, The RGB value of the Blue color, The direction of the painting

The object you want to gradient - Put here the name of the Form/PictureBox you want to gradient.
For example: Form1

The RGB value of the Red/Green/Blue color - Put here number between 0 to 540.
You can use the little affilate program 'Gradient' to check which numbers will give you the desirable result or you can Simply try some numbers till you satisfy.

The direction of the painting - Put here 1 for painting from Top, 2 for painting from Bottom, 3 for painting from Left and 4 for painting from Right.

For Example if you want to paint Form that its name is Form1 you can enter the following code:
Gradient1.gradient Form1, 100, 200, 300, 1

To get good result your Color Palette Should be set to at least 16-bit (high) color.

In Addition to this control you will get the 'Gradient' program which will help you to find the appropiate color to your Form/PictureBox.

TIP: If you want to paint your Form at the very start:

place the code for painting at your Form_Load Event and Set the Form AutoRedraw Property to True, Or Place the code at the Form_Paint Event

Go Back