How can I make a background colour of a form a gradient between two selected colours? I know I could use a background image, but that would make the filesize unnecessarily bigger.
Thanks for any help.
Printable View
How can I make a background colour of a form a gradient between two selected colours? I know I could use a background image, but that would make the filesize unnecessarily bigger.
Thanks for any help.
You can use the Graphics class to draw the gradient colors.
VB Code:
Imports System.Drawing.Drawing2D Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs) e.Graphics.FillRectangle(New LinearGradientBrush(Me.ClientRectangle, Color.Red, Color.Blue, LinearGradientMode.ForwardDiagonal), Me.ClientRectangle) End Sub
Cool, thanks Rob :thumb:
Is there a site that shows things I can do with System.Srawing.Drawing2D? I would like to learn more about its capabilities.
You could also download the vbpowerpack from Microsoft. This has a blend panel control included.
Where can I find this 'vbpowerpack'?
microsoft.com would be a sensible starting place.
This tells you about it:
http://msdn.microsoft.com/library/de...bpowerpack.asp
You can get it from here:
http://www.gotdotnet.com/workspaces/...f-c111fe60ed58
ROFL, I see what you mean... I need to look for it myself.. I know :D
Dudes! Thats Powerpack is friggin awesome :D Thank!!!