class Empty
{
    public static void Main()
    {
        Form f = new Form();
        f.BackColor = Color.White;
        f.Paint += new PaintEventHandler(MyPaintHandler);
        Application.Run(f);
    }
    static void MyPaintHandler(object objSender, PaintEventArgs pea)
    {
        Form form = (Form)objSender;
        Graphics grfx = pea.Graphics;
        form.Font.Size = 50.0f;//这里不能编译,提示是只读的。
        grfx.DrawString("Hello, World", form.Font, Brushes.Black, 0, 0);
    }
}