Hi,
I am building a splash screen, and I have a gradient color scheme for the
form ...
I am writing vertical and horizontal text on the form using the Graphics
object (in the Paint event) like this:
>>> CODE >>>>
With e.Graphics
Dim oFontSplashHead As New Font("Comic Sans", 18)
Dim oBrushSplashHead As New SolidBrush(Color.LightGray)
Dim oVStringFormat As New
StringFormat(StringFormatFlags.DirectionVertical)
Dim oFontAppTitle As New Font("Tahoma", 14, FontStyle.Italic)
Dim oFontCompName As New Font("Tahoma", 32, FontStyle.Bold)
Dim oBrushAppTitle As New SolidBrush(Color.Crimson)
.DrawString(sCompanyName, oFontCompName, oBrushSplashHead, 0.0F, 60.0F,
oVStringFormat)
' Main Application Title
.DrawStringsApptitle1, oFontAppTitle, oBrushAppTitle, 245.0F, 70.0F)
.DrawString(sAppTitle2, oFontAppTitle, oBrushAppTitle, 245.0F, 92.0F)
End with
<<<< END CODE <<<<
Is there any way to have a gradient in the text of sAppTitle1 and
sAppTitle2, so at the top of the text, it is dark (where the form backround
is light) and at the bottom the text is lighter (in contast to the background
of the form where it gets darker)
How can I create a brush that will do that in vb.Net 1.1?
thanks for any help or ideas
Philip
ClayB - 08 Feb 2007 18:14 GMT
Try using System.Drawing.Drawing2D.LinearGradientBrush.
Dim rect As New Rectangle(35, 190, 100, 100)
Dim brush2 As New LinearGradientBrush(rect, Color.DarkOrange,
Color.Aquamarine, LinearGradientMode.ForwardDiagonal)
g.FillEllipse(brush2, 35, 190, 100, 100)
=================
Clay Burch
Syncfusion, Inc.
Stoitcho Goutsev (100) - 08 Feb 2007 20:38 GMT
Philip, you can add the text to a graphics path then widen the path and draw
it filled with wahtever brush you want.
Look at the GraphicsPath class
http://msdn2.microsoft.com/en-us/library/system.drawing.drawing2d.graphicspath.aspx

Signature
HTH
Stoitcho Goutsev (100)
> Hi,
>
[quoted text clipped - 37 lines]
>
> Philip