How to draw Gradient String in form in Vb.Net

By James J

Draw Gradient String in form...

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim StringFormat As New StringFormat()
Dim GradientRectangle As New Rectangle(10, 10, 100, 100)
        Using GradientGraphic =
GradientBrush As New LinearGradientBrush(GradientRectangle, Color.Red, Color.Blue, LinearGradientMode.ForwardDiagonal)
DrawString("Draw gradient string by James J", New System.Drawing.Font("Impact", 35, FontStyle.Bold), GradientBrush, 2.0, 12.0, StringFormat)
End Using
End Using
End Sub

> See below image

How to draw Gradient String in form in Vb.Net  (644 Views)