This is possible using default .NET, so no other components are needed.
Check out following code:
Private Sub GDIPlus_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim myGraphicsPath As New Drawing.Drawing2D.GraphicsPath()
myGraphicsPath.AddString("Hello!", New Drawing.FontFamily("Trebuchet
MS"), _
Drawing.FontStyle.Bold, 100, New Drawing.PointF(10, 50),
Drawing.StringFormat.GenericDefault)
myGraphicsPath.AddRectangle(New Drawing.Rectangle(0, 0, 1000, 30))
Me.Region = New Drawing.[Region](myGraphicsPath)
End Sub
Protected Overrides Sub OnPaint(ByVal e As
System.Windows.Forms.PaintEventArgs)
Dim myGraphicsPath As New Drawing.Drawing2D.GraphicsPath()
Dim rect As Rectangle = New Rectangle(10, 30, 600, 100)
Dim linGrBrush As System.Drawing.Drawing2D.LinearGradientBrush = New
System.Drawing.Drawing2D.LinearGradientBrush( _
rect, Color.Red, Color.Blue,
System.Drawing.Drawing2D.LinearGradientMode.Horizontal)
e.Graphics.FillRectangle(linGrBrush, rect)
End Sub
Source:
http://www.dotnet247.com/247reference/msgs/22/113187.aspx
--
Greetz
Jan Tielens
________________________________
Read my weblog:
http://weblogs.asp.net/jan