Quick and Dirty Gradient

Category:
Screen/Graphics
Type:
Snippets
Difficulty:
Beginning
Author:
Matt Smith

Version Compatibility:

More information:
This draws a line from the top to the bottom of a form or picturebox. For the example I used a picturebox (but I still included a little part if you're doing this for the form). It starts at the left side, and continues gradually changing color from black to red. This thing will work no matter what size form or picturebox. I regret that this code only has the colors from black to red, but that's the way code works.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: