protected override void OnPaint( PaintEventArgs paintEvent ) { Graphics g = paintEvent.Graphics; SolidBrush brush = new SolidBrush(Color.Black); FontStyle style = FontStyle.Regular; Font font = new Font("Times",14,style); g.DrawString("Simple text output in " + brush.Color + " Style " + font.Style , font, brush, 10, 10); brush.Color=Color.DarkBlue; style = FontStyle.Bold; font = new Font("Times" , 14, style); g.DrawString("Simple text output in " + brush.Color + " Style " + font.Style , font, brush, 10, 40); brush.Color=Color.Red; style = FontStyle.Italic; font = new Font("Times" , 14, style); g.DrawString("Simple text output in " + brush.Color + " Style " + font.Style , font, brush, 10, 70); brush.Color=Color.DarkGreen; style = FontStyle.Underline; font = new Font("Times" , 14, style); g.DrawString("Simple text output in " + brush.Color + " Style " + font.Style , font, brush, 10, 100); }