Draw a Gradient Within a Picture Box
The function includes a parameter, mixing, which, when set to true, mixes the gradient square with the background of the picture box.
GradientSquare Picture1, 300, 300, RGB( 0, 0, 255), RGB(255, 0, 0), 255, True
This will draw a square within picture1 in which the color changes from BLUE (center) to YELLOW (border) with center in (300,300) on Picture1 and mix it with the background of Picture1.
NOTE: The AutoRedraw property of the picturebox must be set to false.
Instructions: Click the link below to download the code. Select 'Save' from the IE popup dialog. Once downloaded, open the .zip file from your local drive using WinZip or a comparable program to view the contents.