Draw string with Brushes.Maroon : SolidBrush « 2D Graphics « VB.Net Tutorial






Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Windows.Forms

public class DrawStringWithMaroon
   public Shared Sub Main
        Application.Run(New Form1)
   End Sub
End class

public class Form1
  Inherits System.Windows.Forms.Form

  Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
        Dim fntText = New Font(New FontFamily("Times New Roman"), 48, FontStyle.Italic)
        e.Graphics.DrawString("Hello there!", fntText, Brushes.Maroon, 10, 100)
  End Sub

  Public Sub New()
    Me.ClientSize = New System.Drawing.Size(292, 273)
  End Sub
End Class








17.64.SolidBrush
17.64.1.Create Brush with ColorCreate Brush with Color
17.64.2.Draw string with Brushes.Maroon
17.64.3.Color BrushesColor Brushes
17.64.4.Transparent BrushTransparent Brush