using System;
using System.Drawing;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Graphics graphics = CreateGraphics();
string s = "C# Programming";
Font font = new Font("Garamond", 20);
SolidBrush brush = new SolidBrush(Color.Black);
float x = 100.0f;
float y = 30.0f;
StringFormat format = new StringFormat(StringFormatFlags.DirectionVertical);
graphics.DrawString(s, font, brush, x, y, format);
font.Dispose();
brush.Dispose();
graphics.Dispose();
}
}
}