using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Text;
namespace WindowsFormsApplication13
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Paint(object sender, PaintEventArgs e)
{
string str ="This class provides the set of standard root keys found in the registry on machines running Windows."+
"The registry is a storage facility for information about applications, users, and default system settings. "+
"For example, applications can use the registry for storing information that needs to be preserved once the"+
"application is closed, and access that same information when the application is reloaded. For instance, you"+
"can store color preferences, screen locations, or the size of the window. You can control this for each user "+
"by storing the information in a different location in the registry.";
Graphics g = e.Graphics;
g.TextRenderingHint = TextRenderingHint.AntiAlias;
Rectangle rect = new Rectangle(5, 5, this.ClientSize.Width - 10, this.ClientSize.Height);
using (Font font = new Font("Arial", 25, FontStyle.Regular | FontStyle.Bold, GraphicsUnit.Pixel))
{
using (StringFormat format = new StringFormat())
{
format.Alignment = StringAlignment.Center;
format.FormatFlags = StringFormatFlags.LineLimit;
format.Trimming = StringTrimming.EllipsisWord;
format.HotkeyPrefix = HotkeyPrefix.Show;
g.DrawString(str, font, Brushes.Red, rect, format);
g.DrawRectangle(Pens.Black, rect);
}
}
}
}
}

[With great power comes great responsibility]