How to draw a vertical string on the form using VB.Net

By James J

draw simple given string as vertical 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(), _
            StringFont
As New System.Drawing.Font("Impact", 16), _
            StringBrush
As New SolidBrush(Color.Red)

          
StringFormat.FormatFlags = StringFormatFlags.DirectionVertical
             DrawGrapphicString.
DrawString("Demo of draw Vertical string by James J", StringFont, StringBrush, _
                12.0, 12.0,
StringFormat)
        
End Using

End Sub

> See below image

How to draw a vertical string on the form using VB.Net  (585 Views)