Team Fly |
Page 635
One of the best ways to avoid dull-looking forms is to use gradient metallic shading. It's subtle and conservative enough for any business application, yet considerably more attractive than plain gray.
You can create gradients with Adobe's Photoshop, Corel's Picture Publisher, or most any photo-retouching program. Here's how to do it.
The best metallic gradient is a gradual shift between two shades: white and the typical Windows gray (the light gray often used as shading on windows and controls).
You can use the code in Listing 21.4 to add the top-left to lower-right metallic gradient to a form, as shown in Figure 21.10.
LISTING 21.4: CREATING METALLIC CRADIENTS |
Imports System.Drawing |
To draw gradients on buttons and such, you either can create a gradient the button's size in a graphics program (including caption), then import the graphic into the button's Image property, or you can use this code:
Dim g As Graphics = Button1.CreateGraphics Dim x As Integer = Button1.Width - 3 Dim y As Integer = Button1.Height - 3
Team Fly |