Brushes.Black

image_pdfimage_print
   
 

using System;
using System.Drawing;
using System.Windows.Forms;
   
class HelloWorld: Form
{
     public static void Main()
     {
          Application.Run(new HelloWorld());
     }
     public HelloWorld()
     {
          Text = "Hello World";
          BackColor = Color.White;
     }
     protected override void OnPaint(PaintEventArgs pea)
     {
          Graphics graphics = pea.Graphics;
   
          graphics.DrawString("Hello, Windows Forms!", Font, 
                          Brushes.Black, 0, 0);
     }
}

    


This entry was posted in 2D Graphics. Bookmark the permalink.