How to draw string on the form in VB.Net

By James J

Draw your given string on the form

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim StringFormat As New StringFormat()

        Using DrawGrapphicString
As Graphics = Me.CreateGraphics(), _
As New System.Drawing.Font("Impact", 16), _
As New SolidBrush(Color.Red)

DrawString("Demo of draw string by James J", StringFont, StringBrush, _
                12.0, 12.0,
End Using
End Sub

>See below image

How to draw string on the form in VB.Net  (515 Views)